import javax.swing.border.*; sclass jCenteredLiveValueSection_class extends SingleComponentPanel { IGetterWithNotify liveValue; settable int borderType = BevelBorder.LOWERED; S getTitle() { ret liveValue!; } *(IGetterWithNotify lv, Component c) { super(c); bindLiveValueListenerToComponent(this, liveValue = lv, r-awt { setBorder(BorderFactory.createTitledBorder( makeBaseBorder(), liveValue!)); centerSection(jCenteredLiveValueSection_class.this); revalidate(); }); } swappable Border makeBaseBorder() { ret BorderFactory.createBevelBorder(borderType); } } static JPanel jCenteredLiveValueSection(IGetterWithNotify lv, Component c) swing { ret new jCenteredLiveValueSection_class(lv, c); }