Here you can find the source of getBorder(String title)
public static Border getBorder(String title)
//package com.java2s; //License from project: Apache License import javax.swing.BorderFactory; import javax.swing.border.Border; import javax.swing.border.EtchedBorder; public class Main { public static Border getBorder(String title) { Border loweredetched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); Border b1 = BorderFactory.createEmptyBorder(5, 5, 5, 5); Border b2 = BorderFactory.createTitledBorder(loweredetched, title); return BorderFactory.createCompoundBorder(b1, b2); }/*from w w w .j a v a 2 s . c om*/ }