wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JMenu Problem 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 Problem" Watch "JMenu Problem" New topic
Author

JMenu Problem

Pepo moussa
Ranch Hand

Joined: Mar 20, 2008
Posts: 36
hello i got a little problem i never used jmenu before so i got this code for a simple menu and i want to add actions to the buttons exit, open, delete so i was wondering if anyone can show how to set for example the exit button to exit and so on thank you.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
have you ever added an actionListener to a JButton and coded it to exit the program?

if you have, it is the same procedure for a JMenuItem
Balasubramanian Chandrasekaran
Ranch Hand

Joined: Nov 28, 2007
Posts: 215

You can visit this link to get more details

JMenuItem Handling
Pepo moussa
Ranch Hand

Joined: Mar 20, 2008
Posts: 36
no i did not put actionListener to a JButton. can you post like example so i can follow it
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Originally posted by I moussa:
no i did not put actionListener to a JButton. can you post like example so i can follow it


I can do better than that. I can show you where you can find code and tutorials for this. Please have a look here and here.

Good luck!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMenu Problem
 
Similar Threads
How can I add another text box under this layout?
Swing GUI Interface Question
Opening a new window.
Creating one class from another
JFrame and JMenu