![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Hi, I am having a problem with a Jtree that maybe somebody can help me with. The names that I display on the nodes on the tree vary depending on the states of various objects in my application. In order to change the names of the nodes, I have create a Renderer class which extends DefaultTreeCellRenderer. In that class I have a getTreeCellRendererComponent method..and in there I use the setText method to set the name of the node.....for example setText(myAppObj.getStatus()); This works fine when the application loads and the tree is first built...however if I change the status of the objects in my application, and generate an event which causes the tree to be updated, the node names are now truncated.. so if myAppObj has a state of "open.Running" however when I change the state of myAppObj to "closed.completed" and cause the tree to be updated..it now appears as in other words its truncated.. Does anybody have any ideas why this might be happening..
Replies: |
Sponsored Links
|