The assignment has been given to me to port an existing JPCT JFrame application to a JApplet. My problem is I am getting a NullPointerException within the FrameBuffer class without any hint as to the cause. The stack trace is as follows:
-> support for BufferedImage
-> using BufferedImage
Software renderer (legacy mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
1801-2053 -> using splitted buffer access!
java.lang.NullPointerException
at com.threed.jpct.FrameBuffer.display(Unknown Source)
at com.threed.jpct.FrameBuffer.display(Unknown Source)
at com.threed.jpct.FrameBuffer.display(Unknown Source)
I am still developing the Applet in Eclipse so I'm not trying to load resources from a JAR and the Applet has AllPermissions in its security policy. So, for all purposes, the program is still running as a standalone application except that the top level container has been changed from a JFrame to a JApplet.
Can someone please lead me in the right direction here.
Thanks in Advance, Ray
Looks like as if the Graphics-instance you are using is null. Check this before calling display(Graphics,....) to see if it's the case. There's not much more in display() that could be null.
Thanks, that was the hint I needed.