3 import java.awt.Color;
\r
4 import java.awt.Component;
\r
5 import java.awt.Graphics;
\r
7 import javax.swing.border.LineBorder;
\r
9 public class ChippedBorder extends LineBorder {
\r
11 private static final long serialVersionUID = 1L;
\r
13 public ChippedBorder(Color color, int thickness) {
\r
14 super(color, thickness);
\r
18 public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
\r
19 g.fillRect(0, 0, width, thickness); // 上
\r
20 //g.fillRect(0, height-thickness, width, thickness); // 下
\r
21 //g.fillRect(0, 0, thickness, height); // 左
\r
22 g.fillRect(width-thickness, 0, thickness, height); // 右
\r