JTree How can I force the JTree to display the whole text of nodes?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Norbert_Radics
Posted On:   Thursday, June 16, 2005 02:08 AM

I tried to change the displayed text of nodes depending they are expanded or not, but changing from the smaller string to the longer one, the longer string is cut at the size of the smaller one (even if the original text was the long one and it was displayed correctly). To change the text I modified the toString() method of the user object of the node (DefaultMutableTreeNode). How can I force the JTree to display the whole string every time?

Re: JTree How can I force the JTree to display the whole text of nodes?

Posted By:   Almagest_FUTT  
Posted On:   Thursday, June 16, 2005 06:38 AM

Write your own TreeCellRenderer (it may extend the DefaultTreeCellRenderer and just return different Components for the nodes you're interested in).
About | Sitemap | Contact