add exitApple method into Applet