Terai Atsuhiro 2021-06-08 (火) 11:23:34

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

private static Border makeIconComboBorder(JComponent combo, ImageIcon icon) {
  Border b1 = BorderFactory.createMatteBorder(0,icon.getIconWidth(),0,0,icon);
  Border b2 = BorderFactory.createEmptyBorder(0,5,0,0);
  Border b3 = BorderFactory.createCompoundBorder(b1, b2);
  return BorderFactory.createCompoundBorder(combo.getBorder(), b3);
}