public Insets getInsets() { returnnew Insets(bs*3/2,bs*3/2,bs*3/2,bs*3/2);
}
public Border(Component comp,int s) {
setLayout(new GridLayout(1,1));
add(comp);
bs=s;
}
publicvoid paint(Graphics g) { int w = getSize().width; int h = getSize().height; int x1[]={0,bs,w-bs,w}, y1[]={0,bs,bs,0}; int x2[]={w,w-bs,w-bs,w}, y2[]={0,bs,h-bs,h}; int y3[]={h,h-bs,h-bs,h};