File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Combine two different JPopupmenu

 
tom osayo
Greenhorn
Posts: 13
  • 0
  • 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: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • 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
  • 0
  • 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: 2474
8
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic