private void createGUI(DialogOwner owner) {

    switch (owner) {
      case HIDDEN_DIALOG:
        parentDialog = new Dialog((Frame) null);
        dialog = new TestDialog(parentDialog);
        break;
      case NULL_DIALOG:
        dialog = new TestDialog((Dialog) null);
        break;
      case HIDDEN_FRAME:
        parentFrame = new Frame();
        dialog = new TestDialog(parentFrame);
        break;
      case NULL_FRAME:
        dialog = new TestDialog((Frame) null);
        break;
    }

    assertFalse(dialog == null, "error: null dialog");

    dialog.setLocation(50, 50);
    if (setModal) {
      dialog.setModal(true);
    } else if (modalityType != null) {
      dialog.setModalityType(modalityType);
    }

    dialog.setVisible(true);
  }
  private void showChild() {

    dialog = new TestDialog(parent);
    if (setModal) {
      dialog.setModal(true);
    } else if (modalityType != null) {
      dialog.setModalityType(modalityType);
    }

    dialog.setLocation(250, 50);
    dialog.setVisible(true);
  }