This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Combine two different JPopupmenu

 
tom osayo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code below displays only the menu item from pop2. Any idea ?

 
Rob Spoor
Sheriff
Pie
Posts: 20668
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because you're showing the test popup menu which is the same as popup2.

What you're trying to do won't work. You're adding popup2 to popup as a component, not as an extension of the menu items.
 
tom osayo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
Is there a way to add as popup2 as a popupmenu to popup

If so let me know
 
Rob Camick
Ranch Hand
Posts: 2616
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe a "sub menu" is all you need. Read the section from the Swing tutorial on How to Use Menus.
 
tom osayo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic