Reputation: 1301
I'm trying to increase the size of the text of nodes in my Jtree. Is there any way to do this with/without altering other swing components?
Thanks!
Upvotes: 2
Views: 4421
Reputation: 274532
Use JTree.setFont
. For example:
final Font currentFont = tree.getFont();
final Font bigFont = new Font(currentFont.getName(), currentFont.getStyle(), currentFont.getSize() + 10);
tree.setFont(bigFont);
Upvotes: 3