openGL display on repaint

Could anyone point me to some example code that shows how to integrate openGL rendering into the java repaint cycle?

I want to create a openGL utility which isn’t calling display() in a tight loop, or rendering using an Animator, but which just updates when the normal paint system thinks it should.

TIA

Peter.

If you just add a GLCanvas to the parent component it should behave as you want. See for example the TestContextSharing demo in the jogl-demos workspace.