Inserting GLCanvas into a JPanel

Howdy folks,

A lot of the tutorials don’t show how to mix a jogl canvas with some regular AWT/SWING code for a UI. Any tutes or guidance/code on this area?

I’m having trouble inserting a GLCanvas into a JPanel, and then the JPanel in a JFrame. It seems that only reshape is being called back. None of the other methods seem to work.

Cheers

In NeHe tutorials ports you will find a GLDisplay class that shows how to put a GLCanvas in a JFrame. When adding an intermediate JPanel I got no bug.

You should read this code first and see if it solves your problem : if it doesn’t, please post more information / code samples. I am no jogl guru, but maybe someone will find the answer :wink: