JOGL mouse capture

Yes, well I’ve already searched Google and the boards and cannot find anything other than someone complaining that JOGL is slow.
Is it even possible to capture the mouse in a GLCanvas?

Yep, you can use a MouseListener to be notified of when the cursor leaves the GLCanvas, and a java.awt.Robot to move it back inside. You can also get an invisible cursor with


Dimension d = Toolkit.getDefaultToolkit().getBestCursorSize( 1, 1 );
Image invisibleImage = new BufferedImage( d.width, d.height, BufferedImage.TYPE_INT_ARGB );
Cursor invisibleCursor = Toolkit.getDefaultToolkit().createCustomCursor( invisibleImage, new Point(), "Invisible cursor" );