Example #1
0
  /** @return true if file was saved, false if user canceled */
  boolean onSaveFileClicked() {
    if (currentFile == null) {
      return onSaveAsFileClicked();
    }

    try {
      tournament.saveFile(currentFile);
      return true;
    } catch (Exception e) {
      JOptionPane.showMessageDialog(
          this, e, strings.getString("main.error_caption"), JOptionPane.ERROR_MESSAGE);
    }
    return false;
  }
Example #2
0
 void doSave(File file) throws IOException {
   currentFile = file;
   tournament.saveFile(file);
 }