Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to force a JTree recalculate the size of its nodes

843804Apr 18 2005 — edited Dec 1 2006
Hello,

As far as I know the Layout of a JTree has a cache that helps him perform faster. What I need to do is to invalidate that cache because I need the JTree to recompute the node sisez.

Any ideea how can I do that nicely? (without rebuilding the hole tree...)

The ideea is that when the container of the Tree changes its size so should do its nodes (in my app). But because the value of the nodes does not change the JTree does not ask for the new sizes.

Thaks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2006
Added on Apr 18 2005
5 comments
180 views