Here you can find the source of addBorderSpaces(JComponent com)
public static void addBorderSpaces(JComponent com)
//package com.java2s; //License from project: Open Source License import javax.swing.BorderFactory; import javax.swing.JComponent; public class Main { public static void addBorderSpaces(JComponent com) { com.setBorder(/*from www. ja va 2s . c o m*/ BorderFactory.createCompoundBorder(com.getBorder(), BorderFactory.createEmptyBorder(2, 4, 2, 4))); } }