JOptionPane pane =
new JOptionPane ("You've totally screwed up your login\n" +
"Go back and do it again... and do you think\n" +
"you could remember your password this time?",
JOptionPane.ERROR_MESSAGE,
JOptionPane.OK_OPTION);
JDialog d = pane.createDialog (null, "Shakin'!");
DialogEarthquakeCenter dec = new DialogEarthquakeCenter (d);
d.pack();
d.setModal (false);
d.setVisible(true);
dec.startShake();
// wait (forever) for a non-null click and then quit
while (pane.getValue() == JOptionPane.UNINITIALIZED_VALUE ) {
try { Thread.sleep(100); }
catch (InterruptedException ie) {}
}
System.exit(0);