This is the NervousText applet in javascript:
The test assumes that applet code is generated with:
java -classpath js.jar org.mozilla.javascript.tools.jsc.Main \
  -extends java.applet.Applet \
  -implements java.lang.Runnable \
  NervousText.js
and the resulting 2 classes, NervousText.class extending java.applet.Applet and implementing java.lang.Runnable and NervousText1.class which represents compiled JavaScript code, are placed in the same directory as NervousText.html.

The test also assumes that js.jar from Rhino distribution is available in the same directory.