Using Swing controls in an Applet

Dear all.

I am developing Jmonkey aplication embeded in a Swing GridBagLayout with some Swing controls.

the JME application also uses NiftyGUI controls

Everything is working fine.

But I need to distribute the application as an applet.

I use JME “clean&build” tool to create the applet distributable.

But the applet created has not the Swing controls and grid… it only shows the JME 3D area.

What is the problem?

Is it possible to create an Applet that uses a Swing Grid with JMonkey?


You could use the other applet deployment option or webstart. The issue is that lwjgl needs binary files and they only work without signing when you use the lwjgl applet harness (which expects your application to be a normal one-opengl-window app). Generally using a swing gui is not such a good idea as swing is not portable e.g. to android (and possibly other future deployment options).

Actually you can use GUI controls with LWJGL applet, but you would need to use your own AppletHarness. In this case, you can just attach a regular jME3 canvas or awt panel to your applet. Of course this method won’t work with the jMP applet deployment as its hardcoded to use the jME3 AppletHarness. You would need to edit the generated HTML file to point to your applet class correctly.

OK. I understand. Thanks!