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
If you are using JDK1.2 you could use the
java.awt.Toolkit 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...