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

Adding Submenu to JMenuItem.

 
Rush Art
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I having trouble finding out how to attached submenu to the JMenuItem "Global" with text such as "Max,Min,Sum" as shown on the taken picture. Any idea how the code is for this one?

Thanks.



Submenu.JPG
Example
[Thumbnail for Submenu.JPG]
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Global shouldn't be a JMenuItem but a JMenu instead. That one has methods to add more JMenuItems. And remember, JMenu extends JMenuItem.

Moving to Swing.
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
Rush Art
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot I manged to get this working.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic