List of utility methods to do Swing LineBorder
Component | addBordersToLine(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); ... |
void | addDebugBorders(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); |
boolean | changeBorder(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)) ... |
Border | createDebugBorder() Returns a red line border to simplify layout debugging. return BorderFactory.createLineBorder(Color.RED);
|
Border | createLineBorder() create Line Border return lineBorder;
|
Border | createPanelBorder() 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) ... |
Border | createThickInsetBorder() create Thick Inset Border return BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 2),
BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
void | drawBorders(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(); ... |
Border | getBorderBlue() get Border Blue return getBorderBlue(1);
|
Border | getDefaultLineBorder() get Default Line Border return BorderFactory.createLineBorder(getDefaultBorderColour());
|