Use of JSObject to get applet working