List of utility methods to do JComponent Margin
Border | addMargin(JComponent component, int margin) Add a margin to a given component Border marginBorder = BorderFactory.createEmptyBorder(margin, margin, margin, margin);
component.setBorder(marginBorder);
return marginBorder;
|
void | setMargin(final JComponent component, final int eachSide) set Margin final Insets insets = new Insets(eachSide, eachSide, eachSide, eachSide); setMargin(component, insets); |