try {
// Create the GUI, will implicitly create and start a GUI thread
new ThrowAWT().setVisible(true);
// Wait a while.
Thread.sleep(1000 * 20);
// Create and start a thread that gives
// an ArrayIndexOutOfBoundsException
new ThrowIndex().start();
} catch (Exception ex) {
System.out.println("Caught exception: " + ex);
System.exit(1);
}