The following code doesn't resize the height of a JTableHeader as I would suspect:
qtyTable.getTableHeader().setSize(qtyTable.getTableHeader().getWidth(),30));
instead the following is what worked:
qtyTable.getTableHeader().setPreferredSize(new Dimension(qtyTable.getTableHeader().getWidth(),30));
It's uglier, but at least it works. Tried finding a solution online, and after finding several others that didn't work, this is the one that did.
No comments:
Post a Comment