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!

How can I add a popup for right mouse click for anywhere on application?

843806Jul 16 2009 — edited Jul 18 2009
I have never used popup menus before but need to add on to my application.
This is a swing application with several pages that are basically panels that are added and removed as needed.
I need to have a popup menu that appears anywhere on the application when the right mouse button is clicked,
no matter which component the cursor is over.

I have been able to add one for a specific panel, but that is not what needs to be done, since there are dozens
of separate panels in the application.

Could someone point me to an example of how to make the popup active for anywhere on the application?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2009
Added on Jul 16 2009
26 comments
536 views