AWt input problems

Okay,



I ALMOST have JME working in a Netbeans plugin.  (This is a Swing integration, using JMECanvas.)



The problem i have left is this.  I'm trying to get swing style key input.  If i include this line I got from the swing test, it seems to block mouse and kb input in the panel the Canvas is in:



   AWTMouseInput.setup(canvas, false);



But if I don't include it I get this exception when I try to add the JME canvas to the panel:


WARNING [com.jme.input.lwjgl.LWJGLMouseInput]: Problem during creation of Mouse.
java.lang.IllegalStateException: Display must be created.
[catch] at org.lwjgl.input.Mouse.create(Mouse.java:266)
        at com.jme.input.lwjgl.LWJGLMouseInput.<init>(Unknown Source)
        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(Unknown Source)
        at com.jme.input.InputSystem.update(Unknown Source)
        at com.jmex.awt.lwjgl.LWJGLCanvas.paintGL(Unknown Source)
        at org.lwjgl.opengl.AWTGLCanvas.paint(AWTGLCanvas.java:308)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
        at sun.awt.RepaintArea.paint(RepaintArea.java:224)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:301)
        at java.awt.Component.dispatchEventImpl(Component.java:4489)
        at java.awt.Component.dispatchEvent(Component.java:4243)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
SEVERE [global]
java.lang.IllegalStateException: Cannot determine focused state of uncreated window
        at org.lwjgl.opengl.Display.isActive(Display.java:557)
        at com.jme.input.lwjgl.LWJGLMouseInput.update(Unknown Source)
        at com.jme.input.InputSystem.update(Unknown Source)
        at com.jmex.awt.lwjgl.LWJGLCanvas.paintGL(Unknown Source)
        at org.lwjgl.opengl.AWTGLCanvas.paint(AWTGLCanvas.java:308)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)
        at sun.awt.RepaintArea.paint(RepaintArea.java:224)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:301)
        at java.awt.Component.dispatchEventImpl(Component.java:4489)
        at java.awt.Component.dispatchEvent(Component.java:4243)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)



Help?



NM.



I solved this by attaching my listeners to the canvas itself.