Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Renaming tree node with JPopupMenu

 
Sudhakar Krishnamurthy
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic