List of utility methods to do Swing Empty Border
void | padBorder(JComponent component, int top, int left, int bottom, int right) pad Border component.setBorder( BorderFactory.createCompoundBorder(blankBorder(top, left, bottom, right), component.getBorder())); |
void | removeBorder(JComponent component) remove Border component.setBorder(BorderFactory.createEmptyBorder()); |
JScrollPane | scrollView(Component component, Border border) scroll View JScrollPane scroll = new JScrollPane(); if (border != null) scroll.setBorder(border); scroll.setViewportView(component); return scroll; |
void | setEmptyBorder(int top, int left, int bottom, int right, JComponent... components) Set the border of the given components to an empty border with the given margins. setBorder(BorderFactory.createEmptyBorder(top, left, bottom, right), components); |
void | setStandardBorder(JComponent aComponent) Sets a standard border of the given component. final int bs = BORDER_SIZE; aComponent.setBorder(BorderFactory.createEmptyBorder(bs, bs, bs, bs)); |
Border | spacingBorder() spacing Border return BorderFactory.createEmptyBorder(spacing, spacing, spacing, spacing);
|
JComponent | wrapEmptyBorder(Component content, int top, int left, int bottom, int right) wrap Empty Border return wrapBorder(content, BorderFactory.createEmptyBorder(top, left, bottom, right));
|