g2.setStroke(new BasicStroke(border.bottom, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0)); g2.drawLine(x, y + h, x + w, y + h);
g2.setStroke(new BasicStroke(border.bottom, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, xOffset)); g2.drawLine(x, y + h - border.bottom / 2, x + w, y + h - border.bottom / 2);
    private static void paintPatternedRect(final Graphics2D g2, final Rectangle bounds, final Border border, final BorderColor color, final float[] pattern, final int sides) {        Stroke old_stroke = g2.getStroke();        int x = bounds.x;        int y = bounds.y;        int w = bounds.width;        int h = bounds.height;        if ((sides & TOP) == TOP) {            g2.setColor(color.topColor);            g2.setStroke(new BasicStroke(border.top, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0));            g2.drawLine(x, y, x + w, y);        }        if ((sides & LEFT) == LEFT) {            g2.setColor(color.leftColor);            g2.setStroke(new BasicStroke(border.left, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0));            g2.drawLine(x, y, x, y + h);        }        if ((sides & RIGHT) == RIGHT) {            g2.setColor(color.rightColor);            g2.setStroke(new BasicStroke(border.right, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0));            g2.drawLine(x + w, y, x + w, y + h);        }        if ((sides & BOTTOM) == BOTTOM) {            g2.setColor(color.bottomColor);            g2.setStroke(new BasicStroke(border.bottom, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 0, pattern, 0));            g2.drawLine(x, y + h, x + w, y + h);        }        g2.setStroke(old_stroke);    }