Add "Save Maze" to the menu bar #21

Merged
antograb merged 2 commits from saveMazeFromUI into mvc 2017-12-20 18:21:59 +00:00
Showing only changes of commit 987fb858e4 - Show all commits
+1 -1
View File
@@ -30,7 +30,7 @@ public class SaveMazeMenuItem extends JMenuItem
new FileNameExtensionFilter("Text files", "txt"); new FileNameExtensionFilter("Text files", "txt");
fileChooser.setFileFilter(filter); fileChooser.setFileFilter(filter);
int returnVal = fileChooser.showOpenDialog(mazeApp); int returnVal = fileChooser.showSaveDialog(mazeApp);
if(returnVal == JFileChooser.APPROVE_OPTION) { if(returnVal == JFileChooser.APPROVE_OPTION) {
System.out.println("You chose to save to this file: " + System.out.println("You chose to save to this file: " +
fileChooser.getSelectedFile().getName()); fileChooser.getSelectedFile().getName());