• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMenuItems

 
Chase Bond
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to write a GUI that has a menu, with JMenuItems, and JMenuItems inside JMenuItems. But every time I try to add JMenuItems to JMenuItems they overwrite the name of the previous JMenuItem. How can I fix this problem?
 
Rob Spoor
Sheriff
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use JMenus as JMenuItem containers. JMenu extends JMenuItem so you can use a JMenu everywhere you can use a JMenuItem.
 
Chase Bond
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I am new at this so can you show me how I could use it as a container?
 
Chase Bond
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never Mind my last comment I just figured it out. Thanks anyways!
 
Michael Dunn
Ranch Hand
Posts: 4632
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic