I got a small Jogl application running with a GLCanvas inside an AWT Frame and some Swing components sitting next to the GLCanvas (no overlapping). There’s an Animator class, some java.util.TimerTask classes, etc. The key event listener I registered to the GLCanvas.
Everything works fine. Until you press the ALT key (the left or right one; doesn’t matter). Then the following error stack is being reported:
java.lang.NullPointerException
at javax.swing.SwingUtilities.getWindowAncestor(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsRootPaneUI$AltProcessor.postProcessKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Unfortunately I’m no Java/Swing expert (let alone Jogl/OpenGL so don’t have any idea what I am doing wrong.
What could I do in order to find the error/bug/… ?