Add loading options in JMenuBar
Need to fix bug when loading new maze with different dimensions
This commit is contained in:
1 parent
79ed877d9d
commit
7d5b2938fc
13 files changed
+51
-84
No files matched your search
+5
-1
@@ -12,12 +12,15 @@ public class MazeApp extends JFrame
|
||||
|
||||
private final MazeMenuBar mazeMenuBar;
|
||||
private final WindowPanel windowPanel;
|
||||
private MazeAppModel mazeAppModel = new MazeAppModel();
|
||||
private MazeAppModel mazeAppModel;
|
||||
|
||||
public MazeApp() {
|
||||
|
||||
super("Maze Solving Application");
|
||||
|
||||
this.mazeAppModel = new MazeAppModel();
|
||||
mazeAppModel.addObserver(this);
|
||||
|
||||
setJMenuBar(mazeMenuBar = new MazeMenuBar(this));
|
||||
setContentPane(windowPanel = new WindowPanel(this));
|
||||
|
||||
@@ -34,6 +37,7 @@ public class MazeApp extends JFrame
|
||||
@Override
|
||||
public void update(Observable obs, Object param) {
|
||||
|
||||
System.out.println("New maze detected");
|
||||
windowPanel.notifyForUpdates(param);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user