Click here to Skip to main content
15,898,588 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am trying to create a desktop application using Java Net Beans 6.5.1. Problem is i am new to java and could not find a way to write the event handlers for the first level menu. For Eg: I create "Exit" on the top most level and tried using System.exit(0); to exit the Application but it didn't worked. Likewise other menu options are "Add", "Edit", "Delete" etc. Please help urgently.

Thanking in advance.

IB
Posted
Updated 8-Dec-13 1:34am
v2

1 solution

 
Share this answer
 
Comments
Indrojeet_Bhattacharya 8-Dec-13 10:42am    
this link is of a little help to me. Actually what i wanted is to tame an event handler from JMenu not from JMenuItem.
Richard MacCutchan 8-Dec-13 10:59am    
Then you need to read it more carefully. There is a section on JMenu and how to add actions to them.
Indrojeet_Bhattacharya 9-Dec-13 12:12pm    
sorry boss! no success . . .
Richard MacCutchan 9-Dec-13 12:28pm    
And what do you expect from me?
Indrojeet_Bhattacharya 9-Dec-13 12:37pm    
if you can please refer to me the link. Actually which ever link I am trying is taking me to the same page at different location so i am not sure even if my search is ok or not. Just want to get the idea of the code where if i press the JMenu say ADD, i get the Add Form within the parent window.

Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900