This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have Jtree and popup menu associated with tree. I have different menu items in popup menu. when i start editing tree node I want to show popup with undo,cut,copy,paste etc operation to be performed on editing tree node text.
Extend the DefaultMutableTreeNode to have a boolean array flaggin what are the options allowed for that node. Attach the Popup Listener to this node and check the validity of these options before populating the Popup menu with the options. If valid enable else disable them. That is the simplest approach i can think of. Hope that helps!!