Java Utililty Methods Swing LineBorder

List of utility methods to do Swing LineBorder

Description

The list of methods to do Swing LineBorder are organized into topic(s).

Method

voidsetLineBorder(JComponent... components)
Set the border of the given components to a black line border.
setBorder(BorderFactory.createLineBorder(Color.BLACK), components);
voidshowBorder(JComponent c)
A useful debugging method - sets a red border on a JComponent
showBorder(c, Color.red);
BordertopEtchBorder()
top Etch Border
return new Border() {
    @Override
    public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
        g.translate(x, y);
        g.setColor(c.getBackground().darker());
        g.drawLine(0, 0, width - 2, 0);
        g.setColor(c.getBackground().brighter());
        g.drawLine(1, 1, width - 3, 1);
...