How may I catch popup trigger events for all the components in a JFrame? I tried using GlassPane but it seems a bit to complicated as one must forward all other mouse events in an consistent manner

Sandip Chitale

If you are using JDK1.2 you could use the


public void addAWTEventListener(AWTEventListener listener,
                                long eventMask)

API. You could listen to MOUSE_EVENT_MASK mask. Then check if the source of the event is contained in the JFrame that you are trying to track the isPopupTrigger(). If so then check if mouseEvent.isPopTrigger() and if it is do your thing...

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact