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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Create dynamic JMenuItem and handle its action separately

793886Mar 6 2009 — edited Mar 6 2009
Hi all,

I am looking for a help in creating dynamic JMenuItems under JMenu.

I know that through a loop, I can add the JMenuItem under a JMenu. But how can I identify each JMenuItem object so that I can register the listener for each object and handle the action separately, when I click on each JMenuItem.

Any kindly help will be highly appreciated.

Sumode_v
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 3 2009
Added on Mar 6 2009
4 comments
600 views