Increase text size in Jtree

I am trying to increase the text size of nodes in my Jtree. Is there a way to do this with / without changing other swing components?

Thanks!

+2
source share
1 answer

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);
+3
source

Source: https://habr.com/ru/post/1714449/


All Articles