Example #1
0
    public void actionPerformed(ActionEvent event) {
      // check the text field input is acceptable
      if (nameField.getText() == null || nameField.getText().length() == 0) {
        JOptionPane.showMessageDialog(
            CreateJudgeScreen.this,
            "\"Name\" cannot be blank.",
            "Edit judge name",
            JOptionPane.ERROR_MESSAGE);
        return;
      }

      if (judge == null) {
        judge = new Judge(nameField.getText(), tournament);
        tournament.addJudge(judge);
      } else judge.setName(nameField.getText());

      judge.setDefaultPriority((Priority.PriorityLevel) priorityBox.getSelectedItem());
      judge.setSchoolStrikes(ScSS.getStrikes());
      judge.setStudentStrikes(StSS.getStrikes());

      jp.restoreMainPanel();
    }
Example #2
0
 public void actionPerformed(ActionEvent event) {
   StSS.setVisible(true);
 }