Just as with main tests, an applet may throw an exception
at any time to indicate test failure. A done test applet, for
example, can check for failure in the java.applet.Applet.destroy
method. If an applet doesn't throw an exception, and if, in the case of a
yesno test, the user clicks pass, then the test is
considered to have passed.
Be very careful about where failure is checked. The AWT event thread does not propagate exceptions!