A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
Swing / AWT / SWT
How to make an Expanding Menu
Joined: Oct 12, 2006
Oct 23, 2006 22:31:00
I have the following code:
MenuBar mb = new MenuBar(); setMenuBar(mb); Menu newGame = new Menu("Game"); Menu newHelp = new Menu("Help"); MenuItem newGameNew = new MenuItem("New"); MenuItem newGameExit = new MenuItem("Exit"); MenuItem newHelpAbout = new MenuItem("About"); MenuItem newHelpHelp = new MenuItem("Help"); MenuItem newGameNewOpt1 = new MenuItem("2 x 2"); MenuItem newGameNewOpt2 = new MenuItem("3 x 3"); MenuItem newGameNewOpt3 = new MenuItem("4 x 4"); newGame.add(newGameNew); newGame.add(newGameExit); newHelp.add(newHelpAbout); newHelp.add(newHelpHelp);
I want to put newGameNewOptx into the New menuitem which is available from the Game menu. Any help would be greatly appreciated.
Nevermind, I figured it out... Thanks for reading.
[ October 23, 2006: Message edited by: mark geroso ]
I agree. Here's the link:
subject: How to make an Expanding Menu
PopupMenu in Menu?
problem with program hanging
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015