File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JMenu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JMenu" Watch "JMenu" New topic
Author

JMenu

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

i noticed that JMenu extends JMenuItem. can i add a JMenu to a JMenubar and use it like a JMenuItem. in ActionPerformed() i want to make a second JFrame visible.

for the curious, i currently have 4 menus on the left and a help menu on the right. the help menu has about 6 menu items, each of which displays an information dialog. i want to change it so when you click help in the menubar it shows all the help as a new frame instead.


SCJP
Visit my download page
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

And I hope this link will provide enough details for you about the question.


The quieter you are, the more you are able to hear.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

thanks for the excellent answer Kermal. that does indeed answere the question
i decided a better way any way is to have an Info menu with a help menu item and an about menu item(shows who wrote it)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JMenu
 
Similar Threads
keep the JMenu from closing the pop up of JMenuItems
JMenu items creating problems
How to add JMenuItem to my JMenu??
FocusListner not working on JMenu
MouseEvent not firing in Obuntu