When I call getMouseListeners or getWindowListeners or getKeyListeners ... on a NEWT GLWindow I get a java ClassCastException that says that a Java Object array cannot be cast to a NEWT Listener array: [Ljava.lang.Object; cannot be cast to [Lcom.jogamp.newt.event.MouseListener; in the case of the GLWindow.getMouseListeners()
change JOGL product to NEWT product
Hi For example, getWindowListeners() should not use toArray() because it returns Object[] instead of WindowListener[]. This method: public WindowListener[] getWindowListeners() { return (WindowListener[]) windowListeners.toArray(); } should be replaced by this one: public WindowListener[] getWindowListeners() { return windowListeners.toArray(new WindowListener[windowListeners.size]); } There is the same bug with getKeyListeners(). If you don't want to use <T> T[] toArray(T[] a), just use a simple loop. Best regards.
fixed - thx.