private static void runDemo() {
    ScrollableTextDialog dialog = new ScrollableTextDialog();
    dialog.setText(MESSAGE);
    dialog.pack();
    dialog.setVisible(true);

    boolean done = false;
    do {
      try {
        Thread.sleep(200);
      } catch (InterruptedException ex) {
      }

      if (!dialog.isShowing()) {
        dialog.dispose();
        dialog = null;
        done = true;
      }
    } while (!done);
    System.exit(0);
  } // end runDemo()
 public Window createTestWindow(Container owner) {
   ScrollableTextDialog dialog = new ScrollableTextDialog();
   dialog.setText(MESSAGE);
   return dialog;
 } // end createTestWindow