g.fill3DRect(0, offset, bSize, b.height - 2 * offset, false); g.fill3DRect(offset, 0, b.width - 2 * offset, bSize, false); g.fill3DRect(offset, b.height - bSize, b.width - 2 * offset, bSize, false); g.fill3DRect(b.width - bSize, offset, bSize, b.height - 2 * offset, false);
g.fill3DRect(0, cornerSize, bSize, b.height - 2 * cornerSize, false); g.fill3DRect(cornerSize, 0, b.width - 2 * cornerSize, bSize, false); g.fill3DRect(cornerSize, b.height - bSize, b.width - 2 * cornerSize, bSize, false); g.fill3DRect(b.width - bSize, cornerSize, bSize, b.height - 2 * cornerSize, false);
    public void paintBorder(Component c, Graphics g, int x, int y, int width,                            int height)    {      g.translate(x, y);      Color saved = g.getColor();      Rectangle b = frame.getBounds();      Color d = c.getBackground();      g.setColor(d);      g.fillRect(0, 0, bSize, b.height);      g.fillRect(0, 0, b.width, bSize);      g.fillRect(0, b.height - bSize, b.width, bSize);      g.fillRect(b.width - bSize, 0, bSize, b.height);      int x1 = 0;      int x2 = bSize;      int x3 = b.width - bSize;      int x4 = b.width;      int y1 = 0;      int y2 = bSize;      int y3 = b.height - bSize;      int y4 = b.height;      g.setColor(Color.GRAY);      g.fillRect(0, 0, bSize, y4);      g.fillRect(0, 0, x4, bSize);      g.fillRect(0, y3, b.width, bSize);      g.fillRect(x3, 0, bSize, b.height);      g.fill3DRect(0, offset, bSize, b.height - 2 * offset, false);      g.fill3DRect(offset, 0, b.width - 2 * offset, bSize, false);      g.fill3DRect(offset, b.height - bSize, b.width - 2 * offset, bSize, false);      g.fill3DRect(b.width - bSize, offset, bSize, b.height - 2 * offset, false);      g.translate(-x, -y);      g.setColor(saved);    }