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
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
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 openNew.add(newRedWindow); fileOpen.add(openNew); fileMenu.add(fileOpen);
Hope this is what you are looking for!
This might be a simple problem but I had difficulties finding a solution. I'm trying to return data in specified formats for the same input. I've data in two tables ...
Hello i been doing some program of my own, my program is to get the number of days paased in the year. I am having hard to get get the ...
Hello. I have this tutorial and I'm at a lost. The program is suppose to calculate the call charges according to the rates. conditions:
a) all calls start at 600pm ...