/* * Applets aren't allowed to invoke the exit() method. * If they could, they could kill the browser that loaded them * (how ungrateful ...) * * If you load this applet from a directory on your CLASSPATH, beware - * the applet can invoke the exit() method! * * @version JDK 1.0 beta * @author Marianne Mueller */ import java.awt.*; import java.io.*; import java.lang.*; import java.applet.*; public class exitTest extends Applet { public void paint(Graphics g) { try { Runtime.getRuntime().exit(-1); } catch (SecurityException e) { g.drawString("Caught security exception trying to quit", 10, 10); } } }