Can't register InputHandler

Hi,



I have followed the Pick tutorial fomr JME Wiki. The tutorial assumes (as so often in JME tutoirals) a SimpleGame procedure. I use a JCanvasImplementor and have implemented all methods from the turorial accordingly.

However, writing something like



absoluteMouse.registerWithInputHandler(new InputHandler());



results in the Exception added below.

Dows anyone know a pcocedure to use a custom mouse cursor for picking in a Canvas environment?



Thanks,

Equi



java.lang.IllegalStateException: Display must be created.

at org.lwjgl.input.Mouse.create(Mouse.java:266)

at com.jme.input.lwjgl.LWJGLMouseInput.<init>(LWJGLMouseInput.java:100)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

at com.jme.input.MouseInput.get(MouseInput.java:74)

at com.jme.input.mouse.TriggersMouseInputListener.activate(TriggersMouseInputListener.java:54)

at com.jme.input.mouse.MouseInputHandlerDevice.getMouseListener(MouseInputHandlerDevice.java:56)

at com.jme.input.mouse.MouseInputHandlerDevice$MouseAxisTrigger.<init>(MouseInputHandlerDevice.java:159)

at com.jme.input.mouse.MouseInputHandlerDevice.createTriggers(MouseInputHandlerDevice.java:90)

at com.jme.input.InputHandler.addAction(InputHandler.java:323)

at com.jme.input.AbsoluteMouse.registerWithInputHandler(AbsoluteMouse.java:163)

at at.netcrystals.praxiteles.objects.PraxitelesCanvasImplementor.doSetup(PraxitelesCanvasImplementor.java:254)

at com.jmex.awt.lwjgl.LWJGLCanvas.initGL(LWJGLCanvas.java:113)

at org.lwjgl.opengl.AWTGLCanvas.paint(AWTGLCanvas.java:286)

at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)

at sun.awt.RepaintArea.paint(RepaintArea.java:224)

at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:310)

at java.awt.Component.dispatchEventImpl(Component.java:4706)

at java.awt.Component.dispatchEvent(Component.java:4460)

[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)