File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Edit Values in a JTree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Edit Values in a JTree " Watch "Edit Values in a JTree " New topic

Edit Values in a JTree

Natraj Gudla
Ranch Hand

Joined: Feb 09, 2003
Posts: 34
I have a Jtree , which maintains the status of all of its tree nodes whether they are collapsed or expanded...
Now...from this tree , when the user renames one of the tree node..
how do i change the node name in the Jtree and its representation in the tree..
In the sense i want to know how can i edit the Nodes in a Tree..
In my implementation , I use a TreePath to represent a node.
can any one help me?...
Venkata Cherukuri

Joined: Sep 07, 2003
Posts: 12
get hold of the node- have some set/get methods for the node functions, then u set the name for the node in the rename operation- and reload the model
I agree. Here's the link:
subject: Edit Values in a JTree
It's not a secret anymore!