JTree: Rename a Node using an ActionListener
Hi all,
I have read here many and many posts about renaming JTree nodes but... no one of them has helped me. So despite I may be very boring... I will ask about that again.
The situation is very simple. I have a SAVE button that, when I press it, the name of a node in my JTree has to change.
And the question again, is...
How can I do to change the name of a node in a JTree?
Of course, I know that stupid things like node.toString() = newname are not the solution.
What could I do? How is posible that something that should be so simple is actually not??? How is posible that MutableTreeNode has not a field called "name"??
Im sorry... I feel a bit frustrated now after fighting with this thing for hours...
Thanks for your help,
Fran.