Sachin Kumar
Sachin Kumar

Reputation: 781

JOGL with Swing

I am new to JOGL. I have studied about AWT and Swing in java. I have studied that mixing of AWT and Swing (heavywaight and lightwaight components) is not good and give unpredictable results. I have studied about JOGL with swing from here.
But GLCanvas class is AWT component and GLJPanel is slow in performance. So I want to know that which API I have to use with JOGL while maintaining good performance.

Upvotes: 1

Views: 1023

Answers (1)

gouessej
gouessej

Reputation: 4125

You can put a GLCanvas into a JPanel except in some particular cases (with JInternalFrame), when you need translucent components and there can be some problems when overlapping as Marco13 wrote. JOGL has its own windowing toolkit since its second major version, it's called NEWT, you can use it with AWT, SWT and Swing, it's the best in terms of performance: http://jogamp.org/wiki/index.php/Jogl_FAQ#How_to_use_Newt_with_multiple_Windows_.26_Threads

GLJPanel isn't slow in general, it is less fast than GLCanvas, it is really slow on some combinations of hardware and operating systems.

Upvotes: 1

Related Questions