NullPointerException when GLWindow.setVisible(true) is called?
Posted by Pepe1 on Feb 07, 2014; 12:39pm
URL: https://forum.jogamp.org/NullPointerException-when-GLWindow-setVisible-true-is-called-tp4031493.html
I'm using this code to init a GLWindow:
private void initGLWindow()
{
glWindow = GLWindow.create(caps);
glWindow.setTitle(name);
glWindow.setSize(sizeX, sizeY);
glWindow.setAutoSwapBufferMode(true);
glWindow.addGLEventListener(this);
glWindow.setVisible(true);
}
Pretty straightforward stuff, however when setVisible(true) is called, it suddenly throws a NullPointerException. Why does this happen? All the other calls succeeded, so it's weird that only that last call yields an exception, right?
Thanks for the help!
EDIT: While I'm asking questions: Is it possible to make a GLWindow non-resizable? I've looked through the documentation, but I couldn't find anything.