| Author |
defaultMutableTreeNode
|
Bo Ling
Greenhorn
Joined: Oct 27, 2003
Posts: 5
|
|
|
I use DefaultMutableTreeNode to build tree. How do I change the Node name (just the name is changed, the tree structure remains the same) after building the tree.
|
 |
Nathaniel Stoddard
Ranch Hand
Joined: May 29, 2003
Posts: 1258
|
|
|
It's been a while since I've done JTree stuff, but as I remember it, you use the setUserObject method, passing in an object which will set the caption by caling the toString method on the object. In most cases, I would imagine you would pass a string to setUserObject, or at least an object whose toString method is overridden to provide a useful caption to the tree nodes.
|
Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
|
 |
 |
|
|
subject: defaultMutableTreeNode
|
|
|