Reputation: 2335
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)
Upvotes: 0
Views: 214
Reputation: 691635
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 JMenu
s and JMenuItem
s.
Upvotes: 3