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

ComponentaddBordersToLine(Component content)
add Borders To Line
JPanel rightFooterbelly = new JPanel();
BoxLayout boxLayout3 = new BoxLayout(rightFooterbelly, BoxLayout.X_AXIS);
rightFooterbelly.setLayout(boxLayout3);
rightFooterbelly.setBackground(CYAN);
JLabel leftbar2 = new JLabel();
ImageIcon leftbariconp = new ImageIcon("files/img/latizqp.jpg");
leftbar2.setIcon(leftbariconp);
rightFooterbelly.add(leftbar2);
...
voidaddDebugBorders(JPanel panel)
Adds a one pixel border of random color to this and all panels contained in this panel's child hierarchy.
Color bcolor = new Color(_rando.nextInt(256), _rando.nextInt(256), _rando.nextInt(256));
panel.setBorder(BorderFactory.createLineBorder(bcolor));
for (int ii = 0; ii < panel.getComponentCount(); ii++) {
    Object child = panel.getComponent(ii);
    if (child instanceof JPanel) {
        addDebugBorders((JPanel) child);
booleanchangeBorder(JComponent field, Object fieldValue, PropertyChangeEvent e)
Creates a colored border around the given component in case of incoming change/conflict.
Object oldValue = e.getOldValue();
Object incomingValue = e.getNewValue();
if (fieldValue instanceof String) {
    oldValue = (oldValue != null) ? ((String) oldValue).trim() : "";
    incomingValue = (incomingValue != null) ? ((String) incomingValue).trim() : "";
    fieldValue = (fieldValue != null) ? ((String) fieldValue).trim() : "";
if (incomingValue.equals(fieldValue))
...
BordercreateDebugBorder()
Returns a red line border to simplify layout debugging.
return BorderFactory.createLineBorder(Color.RED);
BordercreateLineBorder()
create Line Border
return lineBorder;
BordercreatePanelBorder()
create Panel Border
Border border = isAquaLAF() ? UIManager.getBorder("InsetBorder.aquaVariant") : null;
if (border == null) {
    if (isWinLAF())
        border = new TitledBorder("");
    else
        border = BorderFactory.createTitledBorder("SAMPLE").getBorder();
if (border == null)
...
BordercreateThickInsetBorder()
create Thick Inset Border
return BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 2),
        BorderFactory.createEmptyBorder(5, 5, 5, 5));
voiddrawBorders(final JPanel panel)
Draw borders around the given JPanel and all descendants.
panel.setBorder(BorderFactory.createLineBorder(Color.RED));
final Component[] components = panel.getComponents();
for (final Component comp : components) {
    if (comp instanceof JPanel) {
        drawBorders((JPanel) comp);
panel.revalidate();
...
BordergetBorderBlue()
get Border Blue
return getBorderBlue(1);
BordergetDefaultLineBorder()
get Default Line Border
return BorderFactory.createLineBorder(getDefaultBorderColour());