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
+10
-7
@@ -16,21 +16,24 @@ public abstract class DrawingBox extends JPanel {
|
||||
|
||||
this.mazeApp = mazeApp;
|
||||
this.color = color;
|
||||
|
||||
setBackground(color);
|
||||
setPreferredSize(new Dimension(40,40));
|
||||
setBorder(BorderFactory.createLineBorder(Color.orange));
|
||||
|
||||
setOpaque(true);
|
||||
setPreferredSize(new Dimension(50,50));
|
||||
setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
|
||||
public void paintComponent(Graphics g) {
|
||||
super.paintComponent(g);
|
||||
|
||||
setBackground(color);
|
||||
}
|
||||
|
||||
public void notifyForUpdates(Object param) {
|
||||
this.repaint();
|
||||
}
|
||||
|
||||
repaint();
|
||||
public void setColor(Color color) {
|
||||
this.color = color;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user