Here you can find the source of createRightBorder(int size, Color color)
public static Border createRightBorder(int size, Color color)
//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 createRightBorder(int size) { return createRightBorder(size, null); }// w w w . ja va 2 s. co m public static Border createRightBorder(int size, Color color) { if (color != null) { return BorderFactory.createMatteBorder(size, 0, size, size, color); } return BorderFactory.createEmptyBorder(size, 0, size, size); } }