Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a pup-up menu

Status
Not open for further replies.

Sedai

Programmer
Joined
Mar 4, 2001
Messages
158
Location
US
Hi!

I was wondering how one can create a pop-up menu that appears at right mouse button click.
I already know how to create the standard File, Edit Help, etc. kind of menus.

Any help would be greatly appreciated.
Thanks. Avendeval


 
There is a Swing class called JPopupMenu that can be used.

Once you have created it aas you like you just then need to set an actionlistener on the area/component you wish it to be a valid pop-up for.
 
im using AWT components.
Is there an AWT equivalent?
Avendeval


 
yep, there is the PopupMenu class in AWT.
 
Thanks! Avendeval


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top