List of utility methods to do Swing LineBorder
Border | getLineBorder() get an outlined border return BorderFactory.createLineBorder(Color.gray);
|
Border | getMandatoryBorder() Lazily creates and returns a Border instance that is used to indicate that a component's content is mandatory. if (mandatoryBorder == null) { mandatoryBorder = new CompoundBorder(new LineBorder(getMandatoryForeground()), new BasicBorders.MarginBorder()); return mandatoryBorder; |
Border | getToolTipBorder() Returns the border used by tool tips in this look and feel. Border border = UIManager.getBorder("ToolTip.border"); if (border == null || isNimbusLookAndFeel()) { border = UIManager.getBorder("nimbusBorder"); if (border == null) { border = BorderFactory.createLineBorder(SystemColor.controlDkShadow); return border; ... |
Border | intToBorder(int borderConstant) int To Border switch (borderConstant) { case EMPTY_BORDER: { return new EmptyBorder(0, 0, 0, 0); case BLACK_LINE_SQUARE_BORDER: { return new LineBorder(Color.black, 3, false); case BLACK_LINE_THIN_SQUARE_BORDER: { ... |
boolean | isAtScrollPaneRightBorder(Component c, int x) is At Scroll Pane Right Border JScrollPane sp = (JScrollPane) SwingUtilities.getAncestorOfClass(JScrollPane.class, c); if (sp != null) { int localX = SwingUtilities.convertPoint(c, x, 0, sp).x; if (localX + 1 == sp.getWidth()) { return true; return false; ... |
void | lineBorder(JComponent comp) line Border comp.setBorder(BorderFactory.createLineBorder(Color.BLUE)); |
void | recursiveAddBorderToPanel(JComponent c) recursive Add Border To Panel if (c instanceof JPanel) { JPanel panel = (JPanel) c; panel.setBorder( BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.BLUE), panel.getName())); for (Component ch : panel.getComponents()) { if (ch instanceof JComponent) { recursiveAddBorderToPanel((JComponent) ch); |
void | setBorder(JComponent comp) set Border setBorder(comp, RAISED_BORDER); |
JComponent | setBorder(JComponent comp, boolean setBorder) set Border return setBorder(comp, setBorder, BorderColor);
|
void | setBorder(JComponent component, int width) Set a border with the specified width to the swing component. component.setBorder(BorderFactory.createLineBorder(component.getBackground(), width)); |