Hi i'm creating a GUI and i have a couple menu items set up with options within those menus. What I'm looking to do is use those items inside the menus to open up more menus kinda like when you go down to all programs in your start menu and it opens another menu beyond that. i can post my code for my menu that i have right now it it would help

5 Years
Discussion Span
Last Post by WolfShield

If I have this right, you want to have a menu and then another menu, ect.
e.g.: File->Open->New->Red Window

If that's the case you just need to assign the menu(s) or menu item(s) to the original
menu item.

e.g. (Sorry if this compiles with errors, I just typed is out without running it):

JMenu fileMenu = new JMenu("File");
JMenu fileOpen = new JMenu("Open");
JMenu openNew = new JMenu("New");
JMenuItem newRedWindow = new JMenuItem("Red Window");

// Now add it to each other
// Adding: newRedWindow to openNew, openNew to fileOpen, fileOpen to fileMenu

Hope this is what you are looking for!

- WolfShield

Votes + Comments
great advice
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.