Does anybody know of a reason why the init method would get called repeatedly. I('m using a GLJPanel where inside the display method I invokel drawable.repaint() if I have not completed rendering after some hunders of milli seconds. When I do this the init, then reshape method is called before the display method. Is this correct. I’m not resizing or anything like that. I’m using the 1.1.0-rc3 with the gluegen jar from january with NVIDIA 9755 video driver on Fedora.
This sounds like a bug in Swing where removeNotify() / addNotify() are being called unnecessarily. What JDK version are you using? Have you tried a more recent version?
I’m using the latest jdk 1.6
Java™ SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot™ Server VM (build 1.6.0_01-b06, mixed mode)
Is there possibly any workaround.
Ok. My GLJPanel is a layer in a JDesktopPane, and the repaint invokes the doLayout of the JDesktopPane. This resizes the GLJPanel, so the multiple init’s is normal.
Does anybody know if a repaint() should cathe doLayout of the container.