the repaint() function didn't work

i use the JOGL to drew line and circle.
when i call repaint() in the actionPerformed,trying to redraw the glcanvas,but it did’t work.
and when i zoom out the window ,then zoom in it,it changes!

what can i do to refresh the window without this bother.

thank you for your attention.

i am waiting your answer

I don’t know much of anything about JOGL, but, in AWT/Swing, repaint() only suggests that the frame be repainted. It doesn’t force it to be repainted.

Try using active rendering. See the Java Tutorial for details.

I’m assuming that you still need to use the same information even though you’re using JOGL. I could be wrong.

Explicitly call display on your GLCanvas or override the repaint method so that it calls canvas.display(). If you need an example, look at my source code, in the class main.GameController and main.GameGLView.