logo
23.2
search
No matching documents found.
list
search
No matching documents found.
logo
Please be aware that there is newer version of documentation available for Webswing. Documentation 24.2

Applet

Java Applet configuration

Webswing offers a solution for running applets in the web browser after the support of Java plugins is being discontinued in modern browsers. Java applets are not supported any more in current versions of Chrome browser: NPAPI support removed from Chrome.

Webswing offers an easy way to continue using your applets on your page the same way you did before, but more securely and reliably. No more struggling with getting your applet to run for clients. Here is how it works.

Applets support:

Setup your applet in Webswing server

In Admin console you can set up your Java applet the same way as a Swing application and most of the settings in the panel are same as with standard Swing applications. The only difference is in Java section, where you set up your Launcher Type as Applet and configure specific settings in Launcher configuration appletClass and additional applet parameters for applets.

Applet configuration

The same can be achieved through JSON configuration file (webswing.config). These are the main differences in configuration in comparison to a Swing application:

...
"launcherType" : "Applet",
"launcherConfig" : {
  "appletClass" : "org.webswing.demo.applet.WebswingDemoApplet",
  "parameters" : {
    "param1" : "paramvalue1",
    "param2" : "paramvalue2"
  }
},
...

appletClass This is the "main" class of your Java Applet, which extends java.applet.Applet class.

parameters For setting custom applet parameters.

Note: the rest of the properties are documented in the Swing application setup page