aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Renaming tree node with JPopupMenu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Renaming tree node with JPopupMenu" Watch "Renaming tree node with JPopupMenu" New topic
Author

Renaming tree node with JPopupMenu

Sudhakar Krishnamurthy
Ranch Hand

Joined: Jun 02, 2003
Posts: 76
I am a newbie to swing, i need help to get started with...
I have a JTree with few nodes, on right clicking i should be able to popup a menu that contains option for renaming the node and when the user clicks on the menu option the node should be renamed, the new name should be validated for text only characters.
I have been able to get to the point where i am able to display the popup menu...need help from there. Not sure where i would do all the validation, in actionPerformed or do i have to have some kind of listeners..???
If any one can post a code fragment or point me to a example code, it'll be greatly appreciated.
TIA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Renaming tree node with JPopupMenu
 
Similar Threads
Tree problem
Restrict Editing the node in JTree on reaching its maximum length
Help on finding the component
how to get javascript value into bean
JTree help