Java applet not working after refresh