When switching the tab of toolwindow, the GLCanvas in Swing JPanel flickers

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

When switching the tab of toolwindow, the GLCanvas in Swing JPanel flickers

wiuyouke
Hello,

When switching the tab of toolwindow, the canvas flickers.

I’m trying to build a GLCanvas in Swing JPanel, but I have a problem to switch toolwindow tab, the CLCanvas is flickering(the content of the entire screen is displayed on the canvas, and it disappears quickly)

The development scenario is to use IDEA(Intellij) for development under the window platform.

we try to inserting the following line into your main() method:

System.setProperty("sun.awt.noerasebackground", "true");

But it didn't take effect.

Please help us, Thanks.

        wuyouke
Reply | Threaded
Open this post in threaded view
|

Re: When switching the tab of toolwindow, the GLCanvas in Swing JPanel flickers

gouessej
Administrator
Hello

Have you tried with a GLJPanel instead of a GLCanvas?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: When switching the tab of toolwindow, the GLCanvas in Swing JPanel flickers

wiuyouke
yes,  we use GLJpanel to solve this problem on windows, but not on Linux. And GLJPanel will report errors, draws slower in Linux.
Reply | Threaded
Open this post in threaded view
|

Re: When switching the tab of toolwindow, the GLCanvas in Swing JPanel flickers

gouessej
Administrator
Which errors? Maybe I have a possible workaround for that.
Julien Gouesse | Personal blog | Website