import javax.swing.border.*; static JPanel jSection(Component c) { ret jSection("", c); } static JPanel jSection(fS title, final Component c) { ret swing(func -> JPanel { Border border = BorderFactory.createBevelBorder(BevelBorder.LOWERED); border = BorderFactory.createTitledBorder(border, title); JPanel panel = new SingleComponentPanel(wrap(c)); panel.setBorder(border); ret panel; }); } static JPanel jSection(S title) { ret jSection(title, new JPanel); }