Terai Atsuhiro 2023-09-19 (火) 16:00:34

http://terai.xrea.jp/swing/matteborder/screenshot.png

Border outside = BorderFactory.createMatteBorder(0,10,1,0,Color.green);
Border inside  = BorderFactory.createEmptyBorder(0,5,0,0);
label.setBorder(BorderFactory.createCompoundBorder(outside, inside));