Posted by
Itun on
Mar 26, 2011; 1:35pm
URL: https://forum.jogamp.org/Application-AWT-NEWT-tp2707118p2735306.html
For me it is important to use Swing, because I can use different tools for my application GUI and it is well-known.
But I don`t want to harm to the performance of JOGL. I`ve heard that NEWT is the best variant to display. Due to I look for Swing NEWT bridge.
I look at the Wade Walker tutorials (
Using_JOGL_in_AWT_SWT_and_Swing)),where he said:
"GLJPanel is supposed integrate 100% correctly into Swing, but with lower performance due to extra copying of the frame buffer".
And I have found the jUnit test on the advice of Sven Gothel, which, I believe, helps me :
TestSwingAWTRobotUsageBeforeJOGLInitBug411.java.
And I was interesting in finction "test01NewtCanvasAWT()".
I'll be glad to hear all the comments about my ideas.
I do not understand very well what does this test do, please explain me.
In my code I do something like this:
GLProfile glProfile = GLProfile.getDefault();
GLCapabilities glCapabilities = new GLCapabilities(glProfile);
GLWindow win1 = GLWindow.create(glCapabilities);
newtCanvasAWT = new NewtCanvasAWT(win1);
.
.
.
jFrame.addWindowListener(new WindowListener() {
public void windowOpened(WindowEvent e) {
}
public void windowClosing(WindowEvent e) {
newtCanvasAWT.destroy();
}
.....
And I`ve been receiving in my IDE output window this:
run:
Detected screen size 1920x1200 //// it was a red
BUILD SUCCESSFUL (total time: 6 seconds)
I think this is a problem.
Thank you, waiting for your help.