Class AppletLauncher

java.lang.Object
org.fest.swing.launcher.AppletLauncher

public class AppletLauncher extends Object
Understands a fluent interface for launching and testing Applets.

An applet can be launched by passing its type as String, the actual type, or an instance of the applet to launch:

 AppletViewer viewer = AppletLauncher.applet("org.fest.swing.applet.MyApplet").start();

 // or


 AppletViewer viewer = AppletLauncher.applet(MyApplet.class).start();

 // or

 AppletViewer viewer = AppletLauncher.applet(new MyApplet()).start();
 

In addition, we can pass parameters to the applet to launch. The parameters to pass are the same that are specified in the HTML "param" tag:

 AppletViewer viewer = AppletLauncher.applet(new MyApplet())
                                     .withParameters(
                                         name("bgcolor").value("blue"),
                                         name("color").value("red"),
                                         name("pause").value("200")
                                      )
                                     .start();

 // or

 Map<String, String> parameters = new HashMap<String, String>();
 parameters.put("bgcolor", "blue");
 parameters.put("color", "red");
 parameters.put("pause", "200");

 AppletViewer viewer = AppletLauncher.applet(new MyApplet()).withParameters(parameters).start();