posted 14 years ago
Hi,
I searched through the forum for the answer, I read several comments, but I still don't know what is the proper way to get a JTree resize it's elements. I have a JTree with each node having custom user object. This object can change so the result of it's toString() can also change. I also use a custom TreeCellRenderer which extends DefaultTreeCellRender and sets the node's icon and tooltip text based on the custom user object. The problem occures whenever the new text is wider than the previous one, in this case the items in the tree will be cropped, since no resize happens on them.
Can anybody explain me the proper(or at least a good) way of doing this.
Thanks in advance,
Miklós