A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
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 ]
Don't get me started about those stupid
subject: How to make an Expanding Menu
problem with program hanging
PopupMenu in Menu?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014