Hi,
looking at JMESwingTest, I wanted replace a SimpleCanvasImpl extended object of a JMECanvas by another one while resizing:
protected void doResize() {
impl=new MyImplementor(comp.getWidth(),comp.getHeight());
((JMECanvas)comp).setImplementor(impl);
}
This code worked with JME 1.x. But with 2.0, I got the following exception:
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at com.jmex.awt.SimpleCanvasImpl.doUpdate(Unknown Source)
at com.jmex.awt.lwjgl.LWJGLCanvas.paintGL(Unknown Source)
at org.lwjgl.opengl.AWTGLCanvas.paint(AWTGLCanvas.java:290)
at org.lwjgl.opengl.AWTGLCanvas.update(AWTGLCanvas.java:321)
at sun.awt.RepaintArea.updateComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at JMESwingTest3$SwingFrame$6.dispatchEvent(JMESwingTest3.java:323)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Best,
Andreas