Login  Register

NewtCanvasAWT resize bug

Posted by Job Zwiers on Jul 26, 2012; 3:43pm
URL: https://forum.jogamp.org/NewtCanvasAWT-resize-bug-tp4025658.html

I noticed that after resizing a NewtCanvasAWT Canvas to height = zero, the application cannot be terminated anymore without using the Windows 7 task manager. I checked this with builds 785, 636, 571. With an older build (417, august 2011) everything works fine. Also, I did not notice any problem with Newt without using NewtCanvasAWT. Any ideas?

The code for a minimal test case:

public class SwingNEWTBug implements   GLEventListener {
   public SwingNEWTBug() {          
     GLWindow glWindow = GLWindow.create(new GLCapabilities(GLProfile.getDefault()));
     NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow);
     glWindow.addGLEventListener(this);
     JFrame jFrame = new JFrame("Resize BUG");
     jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     jFrame.add(newtCanvasAWT);
     jFrame.setSize(640, 480);
     jFrame.setVisible(true);
   }
   public void init(GLAutoDrawable drawable) { }  
   public void dispose(GLAutoDrawable drawable) { }
   public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
   public void display(GLAutoDrawable drawable) { }
   public static void main(String[] arg) {  new SwingNEWTBug();  }
}