public static void createDialog() {
   dialog = new TestDialog(new Frame(), "Instructions");
   String[] defInstr = {"Instructions will appear here. ", ""};
   dialog.printInstructions(defInstr);
   dialog.setVisible(true);
   println("Any messages for the tester will display here.");
 }
Esempio n. 2
0
  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);
  }
Esempio n. 3
0
  private void showParent() {

    parent = new TestDialog((Frame) null);
    parent.setTitle("Parent");
    parent.setLocation(50, 50);
    parent.setVisible(true);
  }
Esempio n. 4
0
  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);
  }
 public static void createDialogWithInstructions(String[] instructions) {
   dialog = new TestDialog(new Frame(), "Instructions");
   dialog.printInstructions(instructions);
   dialog.setVisible(true);
   println("Any messages for the tester will display here.");
 }