Completed applet and tested on server