The code below is part of a demo I downloaded.
public SimpleJoglApp() {
//set the JFrame title
super("Simple JOGL Application");
//kill the process when the JFrame is closed
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//only three JOGL lines of code ... and here they are
GLCapabilities glcaps = new GLCapabilities();
GLCanvas glcanvas = GLDrawableFactory.getFactory()
.createGLCanvas(glcaps);
glcanvas.addGLEventListener(new SimpleGLEventListener());
//add the GLCanvas just like we would any Component
getContentPane().add(glcanvas, BorderLayout.CENTER);
setSize(500, 300);
//center the JFrame on the screen
centerWindow(this);
}
I am having a problem with the line the shown below:
GLCanvas glcanvas = GLDrawableFactory.getFactory()
.createGLCanvas(glcaps);
The problem is that there is no method .createGLCanvas(). How do I get round this problem.
Thanks