I have 2 Swing files 1 is Sync7000_SubChildConfTool.java (main file) and 2nd file is SerialPortSubChild.java. After running the main file SYNC7000 (root node) will display. If i right click on this root node i am getting 4 menu items (Add Serial Channel, Add Optical Channel, Add TCP/UDP Channel, Add Modem Channel) in popup. If i right click on that particular menu item then SerialPortSubChild file will open and after filling this frame i am getting Child node. It is fine up to now. But my problem is if i right click on particular Child node i want to display the menu items like Add Polling Group, Edit Channel, Delete Channel in the popup. Please anyone help me.
Very few people if any, will want to try out ~500+ lines of code to find out the solution. The preferred way is for you to post a sscce code which demonstrates your problem.
While you are at it, it might also be a good idea for you to read this.
just going by your description, a solution might be to add all the menuitems to the popup,
then when a node is clicked, if that node does not meet your criteria for edit/delete etc,
set those extra items disabled, or visible(false). note that if you're using mouseListeners,
they'll still fire on disabled items.
I'm getting totally fed up with these inconsiderate cross-posters