Add LoadMazeMenuItem (not finished)

This commit is contained in:
antograb committed 2017-12-16 15:47:16 +01:00
1 parent d8acf6ebe8
commit a6783e4a0d
3 files changed
+56 -15

No files matched your search

+14 -15
View File
@@ -25,23 +25,22 @@ public class QuitMenuItem extends JMenuItem
MazeAppModel mazeAppModel = mazeApp.getMazeAppModel();
if (mazeAppModel.isModified()) {
int response = JOptionPane.showInternalOptionDialog(this,
int response = JOptionPane.showInternalOptionDialog(this,
"Maze not saved. Save it ?",
"Quit application",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE,
null,null,null) ;
switch (response) {
case JOptionPane.CANCEL_OPTION:
return;
case JOptionPane.OK_OPTION:
mazeAppModel.saveToFile();
break;
case JOptionPane.NO_OPTION:
break;
}
}
System.exit(0) ;
}
null,null,null);
switch (response) {
case JOptionPane.CANCEL_OPTION:
return;
case JOptionPane.OK_OPTION:
mazeAppModel.saveToFile();
break;
case JOptionPane.NO_OPTION:
break;
}
}
System.exit(0) ;
}
}