Add loading options in JMenuBar

Need to fix bug when loading new maze
with different dimensions
This commit is contained in:
antograb committed 2017-12-17 20:27:55 +01:00
1 parent 79ed877d9d
commit 7d5b2938fc
13 files changed
+51 -84

No files matched your search

+10 -7
View File
@@ -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;
}
}