Java applet and swing based snake game