Trying to make it run in an Applet