Here you can find the source of createInnerBorder(int size)
public static Border createInnerBorder(int size)
//package com.java2s; //License from project: Open Source License import java.awt.Color; import javax.swing.BorderFactory; import javax.swing.border.Border; public class Main { public static Border createInnerBorder(int size) { return createInnerBorder(size, null); }//from w ww . j av a 2 s .c o m public static Border createInnerBorder(int size, Color color) { if (color != null) { return BorderFactory.createMatteBorder(size, 0, size, 0, color); } return BorderFactory.createEmptyBorder(size, 0, size, 0); } }