0

I am trying to learn Java Swing and Windows Builder by creating a personal project. I added a menu bar File, Edit, View, Help etc. When I click on 'File' I get Open,Save,Save As. This is also correct. But using the default options in Windows Builder, Gives me a sub menu under 'Open' indicated by an arrow but I don't want this all I want is:

File - Open - Save - Save As

And I want to get rid of

File - Open ->NULL (this is what comes as default in Windows builder)

mKorbel
  • 109,525
  • 20
  • 134
  • 319
Deepak B
  • 2,245
  • 5
  • 26
  • 28

1 Answers1

3

You probably added an "Open" JMenu, instead of adding an "Open" JMenuItem. The source code would confirm it.

JMenuItem is a leaf in the menu tree. JMenu is a container for other JMenus and JMenuItems.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255