Is it possible to use swing integration with 0.9?

Since the JMESwingTest class doesn't run for me, I decided do put up a very minimalistic test by myself, to find out why. This is my JFrame's constructor:



    public NewJFrame() {
        initComponents();
        InputSystem.createInputSystem(InputSystem.INPUT_SYSTEM_DUMMY);
        Canvas canvas = DisplaySystem.getDisplaySystem(DisplaySystem.DISPLAY_SYSTEM_LWJGL).createCanvas(800, 600);
        canvas.setBounds(0,0, 800, 600);
        TerrainEditor impl = new TerrainEditor(canvas);
        ((JMECanvas) canvas).setImplementor(impl);
        add(canvas);
        pack();
        setLocationRelativeTo(null);
    }


   
besides this, and displaying the NewJFrame, nothing else happens in that class. Running it, however, results in the following error message:


13.10.2005 20:29:36 com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Unsupported provider: DUMMY
        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:256)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248)



At first glance, this thread: http://www.jmonkeyengine.com/jmeforum/index.php?topic=2287.0  seemed to provide a solution, but running RenParticleEditor won't work for me, either. I am using the latest version oj jme and enclosed lwjgl library from cvs. What am I doing wrong?

I assume you are not referring to 0.9 but to the cvs version, as INPUT_SYSTEM_DUMMY is not in 0.9.



JMESwingTest does not seem to work at this time - I hope renanse can have a look at it.



Have a look at RenControlEditor for an example.



Regarding the exception above: At this time INPUT_SYSTEM_DUMMY is supported for joystick only. (Don't use it in createInputSystem - and don't use createInputSystem, it's deprecated  ;))

Thanks a lot for the fast and helpful answer. RenControlEditor seems to work, so that should help.

Fixed.  An update on InputSystem was added to enable the new AWT Input systems, but if you aren't using those…  Now that update is disabled unless you ask for it like so:


            // We are going to use jme's Input systems, so enable updating.
            ((JMECanvas)glCanvas).setUpdateInput(true);