|
Hello,
I am attempting to listen to mouse release events that occur outside the JFrame of my application which uses a NewtCanvasAWT and GLWindow. Essentially, if someone has clicked inside the canvas, drags outside the canvas, and releases, I want to detect this release event.
With pure Swing this is possible by adding an AWTEventListener like so:
Toolkit.getDefaultToolkit().addAWTEventListener(new Listener(), AWTEvent.MOUSE_EVENT_MASK);
If you clicked in an AWT component, and release even outside that component (or outside the entire application) you receive the event, which is exactly the functionality I'm looking for.
However, I'm not sure of the way to do this with a NewtCanvas. It does not register itself as an AWT component so using the AWTEventListener does not work. Is there any method to listen to mouse events outside the canvas (and application) as I have described?
Thanks,
Jesse
|