Java tutorial
import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.border.EmptyBorder; public class Main { public static void main(String[] argv) { EmptyBorder emptyBorder = (EmptyBorder) BorderFactory.createEmptyBorder(); JLabel component = new JLabel("label"); component.setBorder(emptyBorder); } }