First there is something wrong with registering for this site. The letters you have to type in don’t all show most of the time and the part where it reads you the letters usually only reads the first two. It took me about 10 trys to register. (I’m using the latest version of Firefox)
Anyway:
I am having a spot of trouble with GLJPanel. When I move the JFrame that contains the GLJPanel, OpenGL doesn’t recognize the new location of the GLJPanel. OpenGL still tries to draw the image where the panel use to be. You can’t see it, but it’s there if you move the GLJPanel back. If I resize the JFrame, OpenGL pops into place.
I came up with a workaround that works OK. I listen to the JFrame’s componentMoved event and resize the JFrame to emulate what happens when I resize the JFrame manually.
int sign=1;
public void componentMoved(ComponentEvent e){
sign*=-1;
frame.setSize(frame.getWidth()+sign,frame.getHeight());
}
However, I don’t particularly like this solution. The changing of the frame size by a pixel is a bit annoying. Is there a better way?