コード例 #1
0
  public static boolean showDialogue(JFrame parent, StringBuffer initials, StringBuffer subjectID) {
    ExperimentStartDialogue myDialogue = new ExperimentStartDialogue(parent, true);
    myDialogue.setVisible(true);

    if (myDialogue.isExperimentStart) {
      initials.append(myDialogue.getInitials());
      subjectID.append(myDialogue.getSubjectNumber());
    }

    return myDialogue.isExperimentStart;
  }
コード例 #2
0
  /** @param args the command line arguments */
  public static void main(String args[]) {
    // java.awt.EventQueue.invokeLater(new Runnable() {
    // public void run() {
    //    ExperimentStartDialogue dialog = new ExperimentStartDialogue(new javax.swing.JFrame(),
    // true);
    //    dialog.addWindowListener(new java.awt.event.WindowAdapter() {
    //        public void windowClosing(java.awt.event.WindowEvent e) {
    //            System.exit(0);
    //        }
    //    });
    //    dialog.setVisible(true);
    // }
    // });

    StringBuffer initials = new StringBuffer(ExperimentStartDialogue.MAX_CHARS);
    StringBuffer subjectID = new StringBuffer(ExperimentStartDialogue.MAX_CHARS);
    boolean isStart = ExperimentStartDialogue.showDialogue(null, initials, subjectID);
    if (isStart) {
      System.out.println(initials + " - " + subjectID);
    }

    System.exit(0);
  }