java - How to ensure that text is rendered to fit in tree? -


jtree not seem automatically resize nodes accommodate fonts of size 20+. i've tried calling revalidate(), doesn't seem help. text in nodes appears "squished" vertically top , bottom of letters clipped.

how can use large fonts , ensure displayed jtree?

some lafs (e.g. windowslookandfeel) set fixed rowheight rather arbitrary (like 16px). sure either force tree dynamically compute height each node:

 tree.setrowheight(-1); 

or calculate rowheight based on tree's font , set fixed height.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -