Login  Register

Following tutorial AWT Frame does not display

Posted by kralvarado on Jan 22, 2012; 10:18am
URL: https://forum.jogamp.org/Following-tutorial-AWT-Frame-does-not-display-tp3679133.html

I'm new to JOGL. I'm using winXP-32bit, on an AMD64 bit (Acer Aspire 5004). I followed the directions to install JOGL into Eclipse by creating the User Libraries and pointing to the gluegen-rt.jar jogl.all.jar and pointed the native library to the jogamp-windows-i586\lib directory.

I used the following exampe code, found on a website, to test if I had installed correctly.

public class SimpleScene {
public static void main(String[] args) {
GLProfile glp = GLProfile.getDefault();
GLCapabilities caps = new GLCapabilities(glp);
GLCanvas canvas = new GLCanvas(caps);

Frame frame = new Frame("AWT Window Test");
frame.setSize(300, 300);
frame.add(canvas);
frame.setVisible(true);

frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
}
}

When running, nothing happened, no window would display. However, when I changed canvas from GLCanvas and used a java.awt.Canvas instead the frame would display. When debugging, I noticed that the debugger would hang on the line frame.setVisible(true);

I'm at a loss, because I followed the same steps on an Eee PC netbook, the same configuration and code displayed the frame window as expected.

Any help would be greatly appreciated. Thanks in advance.