I\'m using Nimbus L&F. I\'m trying to change font size globally for all JTable by using the following code:
NimbusLookAndFeel nimbus = new NimbusLookAnd
Basically, there is nothing by intention. The relevant code-comment in BasicTableUI:
// JTable's original row height is 16. To correctly display the
// contents on Linux we should have set it to 18, Windows 19 and
// Solaris 20. As these values vary so much it's too hard to
// be backward compatable and try to update the row height, we're
// therefor NOT going to adjust the row height based on font. If the
// developer changes the font, it's there responsability to update
// the row height.
On the bright side, some LAFs like f.i. Nimbus respect a ui property for rowHeight:
UIManager.put("Table.font", new FontUIResource(new Font("SansSerif", Font.PLAIN, 28)));
// here simply the font height, need to do better
int height = 28;
UIManager.put("Table.rowHeight", height);