boolean result = saveProject(project, "Save project");
boolean result = saveProject(project, "Save Project");
    private boolean closeProjectHook(Project project, String savePromptTitle) {        if (project == null || !project.isModified())            return true;                // Confirm that the project should be closed.        int option = JOptionPane.showConfirmDialog(this, "Save project?", savePromptTitle,        JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);                if (option == JOptionPane.CANCEL_OPTION)            return false;        else if (option == JOptionPane.YES_OPTION) {            boolean result = saveProject(project, "Save project");            if (result)                JOptionPane.showMessageDialog(this, "Project saved");            return result;        } else            return true;    }