dialog.show();
dialog.setVisible(true);
  public static DisplayMode showSelectionDialog() {    SelectionDialog dialog = new SelectionDialog();    dialog.show();    dialog.waitFor();    return dialog.selected();  }