• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMenu Problem

 
Pepo moussa
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 215
Firefox Browser Linux VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can visit this link to get more details

JMenuItem Handling
 
Pepo moussa
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i did not put actionListener to a JButton. can you post like example so i can follow it
 
pete stein
Bartender
Posts: 1561
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic