Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Adding ActionListener to JMenu

843804Sep 23 2004 — edited Oct 12 2004

Is it possible to add actionListener to Jmenu object

for example File, Format, Exit these are Menus added in the menuBar not menu items
on clicking the Exit the frame shuld get closed.

For detecting the action clicked on the Menu shall i use actionListener?

I have tried using MenuListener its getting invoked on selection

I dont want it on selection , I want the frame to be displayed only on clicking that menu.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 9 2004
Added on Sep 23 2004
9 comments
1,024 views