diff options
Diffstat (limited to 'src/jrummikub/view/impl/CustomBorder.java')
-rw-r--r-- | src/jrummikub/view/impl/CustomBorder.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/jrummikub/view/impl/CustomBorder.java b/src/jrummikub/view/impl/CustomBorder.java index 3e79ce7..eae0589 100644 --- a/src/jrummikub/view/impl/CustomBorder.java +++ b/src/jrummikub/view/impl/CustomBorder.java @@ -10,7 +10,7 @@ import javax.swing.border.Border; class CustomBorder implements Border { private Color color; private int top, left, bottom, right; - + public CustomBorder(Color color, int top, int left, int bottom, int right) { this.color = color; this.top = top; @@ -18,7 +18,7 @@ class CustomBorder implements Border { this.bottom = bottom; this.right = right; } - + @Override public Insets getBorderInsets(Component c) { return new Insets(top, left, bottom, right); @@ -30,13 +30,14 @@ class CustomBorder implements Border { } @Override - public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { + public void paintBorder(Component c, Graphics g, int x, int y, int width, + int height) { g.setColor(color); - + g.fillRect(x, y, width, top); - g.fillRect(x, y+height-bottom, width, bottom); + g.fillRect(x, y + height - bottom, width, bottom); g.fillRect(x, y, left, height); - g.fillRect(x+width-right, y, right, height); + g.fillRect(x + width - right, y, right, height); } } |