Java Utililty Methods JComponent Margin

List of utility methods to do JComponent Margin

Description

The list of methods to do JComponent Margin are organized into topic(s).

Method

BorderaddMargin(JComponent component, int margin)
Add a margin to a given component
Border marginBorder = BorderFactory.createEmptyBorder(margin, margin, margin, margin);
component.setBorder(marginBorder);
return marginBorder;
voidsetMargin(final JComponent component, final int eachSide)
set Margin
final Insets insets = new Insets(eachSide, eachSide, eachSide, eachSide);
setMargin(component, insets);