Merge branch 'boxTypeEdition' into mvc and cleanup
* Merge branch 'boxTypeEdition' into mvc * Remove some useless spaces and blank lines
This commit was merged in pull request #18.
This commit is contained in:
12 files changed
+158
-13
No files matched your search
@@ -2,6 +2,8 @@ package ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Graphics;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.BorderFactory;
|
||||
|
||||
@@ -18,7 +20,17 @@ public abstract class DrawingBox extends JPanel {
|
||||
setBackground(color);
|
||||
setPreferredSize(new Dimension(40,40));
|
||||
setBorder(BorderFactory.createLineBorder(Color.orange));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
|
||||
super.paintComponent(g);
|
||||
setBackground(color);
|
||||
}
|
||||
|
||||
public void notifyForUpdates(Object param) {
|
||||
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user