java.awt.Component
UiProvider
51525354555657
JLabel label = new JLabel("This is the UI"); TitledBorder border = new TitledBorder("Title"); border.setTitlePosition(TitledBorder.ABOVE_TOP); border.setTitleColor(Color.GRAY); label.setBorder(border); return new UiProviderAdapter(label); }