– Re: GLJPanel on JInternalFrame
In Reply To
Here is a very simple application that reproduces the bug:
public final class TestApp implements GLEventListener
public static void main(final String inArguments)
JFrame frame = new JFrame();
javax.media.opengl.awt.GLJPanel canvas = new javax.media.opengl.awt.GLJPanel();
// Give frame the screen size as initial size.
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
public void display(GLAutoDrawable arg0)
GL2 gl = arg0.getGL().getGL2();
// Simply draw something: a green triangle on a red background.
gl.glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
gl.glColor3f(0.0f, 1.0f, 0.0f);
public void dispose(GLAutoDrawable arg0)
public void init(GLAutoDrawable arg0)
public void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3, int arg4)
On my computer, here is what I witness on my 1680x1050 screen:
-at startup the GLJPanel is properly painted from its left bound til the 1024th pixel. At the right of this limit, the panel is black.
-when I reduce panel's height below 400 pixels, the properly painted portion's width lowers to 512 pixels. From that point, when I increase panel's height again, the portion's becomes 1024 pixel wide again when panel's height exceeds 512 pixels.
-if I keep on reducing panel's height, the painted portion's width reduces to 256, then 128, then 64 pixels, etc...
I hope this code sample will help. I would be happy to file a bug in Bugzilla or to perform other investigation if you feel like it could be useful.
Thanks again for your help.
I just wanted to point out the fact that I reproduced this painting issue with a GLJPanel in a top level JFrame. This is the proof that the bug is not related to the use of JInternalFrame.