/** @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; }
void doSave(File file) throws IOException { currentFile = file; tournament.saveFile(file); }