Thanks for the useful link. I wrote a few lines of code to test this but I can’t even resize the windows itself. In my code I already did surface.setResizable(true). Doing window.setResizable(true) gives me the following error:
RunnableTask.run(): A caught exception occured on thread main-Display-.windows_nil-1-EDT-1: RunnableTask[enqueued true[executed false, flushed false], tTotal 0 ms, tExec 0 ms, tQueue 0 ms, attachment null, throwable java.lang.RuntimeException: Waited 5000ms for: <61a7904a, 55421619>[count 3, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.windows_nil-1-EDT-1>]
java.lang.RuntimeException: Waited 5000ms for: <61a7904a, 55421619>[count 3, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.windows_nil-1-EDT-1>
at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
at jogamp.newt.WindowImpl$ResizableAction.run(WindowImpl.java:2118)
at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:450)
at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2782)
at jogamp.newt.WindowImpl.setResizable(WindowImpl.java:2154)
at com.jogamp.newt.opengl.GLWindow.setResizable(GLWindow.java:370)
at processing.opengl.PSurfaceJOGL$5.run(PSurfaceJOGL.java:452)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:127)
at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:375)
DefaultEDT.run(): Caught exception occured on thread main-Display-.windows_nil-1-EDT-1: RunnableTask[enqueued false[executed true, flushed false], tTotal 5001 ms, tExec 5001 ms, tQueue 0 ms, attachment null, throwable java.lang.RuntimeException: Waited 5000ms for: <61a7904a, 55421619>[count 3, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.windows_nil-1-EDT-1>]
java.lang.RuntimeException: Waited 5000ms for: <61a7904a, 55421619>[count 3, qsz 0, owner <main-FPSAWTAnimator#00-Timer0>] - <main-Display-.windows_nil-1-EDT-1>
at jogamp.common.util.locks.RecursiveLockImpl01Unfairish.lock(RecursiveLockImpl01Unfairish.java:198)
at jogamp.newt.WindowImpl$ResizableAction.run(WindowImpl.java:2118)
at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:450)
at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2782)
at jogamp.newt.WindowImpl.setResizable(WindowImpl.java:2154)
at com.jogamp.newt.opengl.GLWindow.setResizable(GLWindow.java:370)
at processing.opengl.PSurfaceJOGL$5.run(PSurfaceJOGL.java:452)
at com.jogamp.common.util.RunnableTask.run(RunnableTask.java:127)
at jogamp.newt.DefaultEDTUtil$NEDT.run(DefaultEDTUtil.java:375)
handleDraw() called before finishing
com.jogamp.opengl.GLException: Caught ThreadDeath: null on thread main-FPSAWTAnimator#00-Timer0
at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
at jogamp.opengl.GLAutoDrawableBase.defaultWindowResizedOp(GLAutoDrawableBase.java:260)
at com.jogamp.newt.opengl.GLWindow.access$200(GLWindow.java:119)
at com.jogamp.newt.opengl.GLWindow$2.windowResized(GLWindow.java:141)
at jogamp.newt.WindowImpl.consumeWindowEvent(WindowImpl.java:4383)
at jogamp.newt.WindowImpl.sendWindowEvent(WindowImpl.java:4317)
at jogamp.newt.WindowImpl$ResizableAction.run(WindowImpl.java:2137)
at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:2780)
at jogamp.newt.WindowImpl.setResizable(WindowImpl.java:2154)
at com.jogamp.newt.opengl.GLWindow.setResizable(GLWindow.java:370)
at mypackage.Game.setup(Game.java:268)
at processing.core.PApplet.handleDraw(PApplet.java:2412)
at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:859)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ThreadDeath
at java.lang.Thread.stop(Thread.java:853)
at com.jogamp.newt.opengl.GLWindow$GLLifecycleHook$1.run(GLWindow.java:724)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.newt.opengl.GLWindow$GLLifecycleHook.shutdownRenderingAction(GLWindow.java:719)
at jogamp.newt.WindowImpl.shutdown(WindowImpl.java:635)
at jogamp.newt.WindowImpl.shutdownAll(WindowImpl.java:123)
at jogamp.newt.DisplayImpl$1.run(DisplayImpl.java:74)
at com.jogamp.nativewindow.NativeWindowFactory.shutdown(NativeWindowFactory.java:272)
at com.jogamp.nativewindow.NativeWindowFactory$2$1.run(NativeWindowFactory.java:190)
at java.lang.Thread.run(Thread.java:748)
I don’t know what is happening here .