private boolean requestSave(){
  String msg="Save edited domain file?";
  int n=JOptionPane.showConfirmDialog(frame,msg);
  if (n == 0) {
    saveDomain();
    return true;
  }
 else   if (n == 1) {
    editorTab.rereadFile();
    setSavedFlag(true);
    return true;
  }
  return false;
}

private boolean requestSave ( ) { String msg = "Save edited domain file?" ; int n = JOptionPane . showConfirmDialog ( frame , msg ) ; if ( n == 0 ) { saveDomain ( ) ; return true ; } else if ( n == 1 ) { editorTab . rereadFile ( ) ; setSavedFlag ( true ) ; return true ; } return false ; }
asks the user whether to save the file . the method returns true if an action ( save or discard changes ) has been performed . else ( i . e . if the user has clicked cancel ) , return false .
