Draw image with fengui

Hi, i want to add a speedometer to my car game in the bottom right corner, like this one:


iv imported fenggui and i have the images ready but i have no idea how to go about it.

iv made this code(probably all wrong):

disp = new Display(new org.fenggui.render.lwjgl.LWJGLBinding());

        //  Create a dialog and set it to some location on the screen

        sm = new Speedometer();

        frame = new Canvas();


        frame.setX(properties.getWidth() - 270);


        frame.setSize(256, 256);


        frame.getAppearance().paint(sm.getGraphics(), 0, 0, 256, 256);

to my understanding i have created a canvas which i have then placed in the bottom right corner.

Speedometer is my own class which extends javax.swing.JPanel and basically just draws the speedometer onto itself.

knowing my stupidity i assumed the paint method in the Background class had an awt.Graphics as the first parameter and it would all have been peachy, however it turns out to be some fenggui graphics which i have no idea how to make/import images into etc…

can someone lend a hand?

If you want swing, why not use JMEDesktop instead of fenggui? It may be slower, but IMO it would be enough for a speedometer to update at about 15-20 fps, so it probably won't hurt your framerate much.

err ok sounds goood, do you know he equivalent for my code in jmeDEsktop?

the user guide has nothing on jmeDesktop, is there anywhere with tutorials?

You should make the jmetest package in jME your default tutorial resource. It has example programs (working and with code) for pretty much every single feature in jME

ok its taken me ages and iv finally done it, however although the image is transparent, the jpanel is not which means my speedometer has a big white box around it!

how can i make the jpanel invisible?

Why use swing for a speed meter? What a waste, this can easily be done with two quads in the ortho queue…

arrgh it works this way, im not good with quads (ie i dont understand them at all!)