You definitely need to go through basic Swing tutorials asap. A few things to get you started:
You do not need to go through all of that razzmataz(its a complex scientific term meaning excessive code which doesn't really make sense) to make your JMenuItem.
A simple: is sufficient.
Last tip before you go off and dig into Swing tutorials, order does matter. So do not add your JMenuItem to a JMenu after the JMenu has been added to a JMenuBar.
Good Luck to you in all your Java and Swing endeavors!
I needed a JFrame in which the JMenuBar needed to be added.
Thanks for all the help.
Now I need to set up what JMenuItem should do.
Joined: Sep 09, 2010
Darryl Burke wrote:
Bobby Smallman wrote:do not add your JMenuItem to a JMenu after the JMenu has been added to a JMenuBar.
How would that be a problem? Are you aware that menus are sometimes generated at runtime?
I guess I was sleepy and didn't express myself accurately, I did not mean it as though it would not compile. I meant to say that your ordering of JMenuItems will be important when you have multiple items to place both visually and for readability.