In my code, depending on a condition, a JTree
node might or might not have an Icon
.
My problem is when I want to set the Icon
for a node, the size of the node's name is reduced and "..." are appended.
So basically, the node is recaulculating its size based on the icon size and fitting the rest.
How can I prevent this behavior and permit the node to expand its size when an icon is added?
Here is a screenshot of without/with icon: