JPanel (@NlsContexts.Label String labelText, JComponent component) { final JPanel panel = new JPanel(new BorderLayout(JBUI.scale(4), JBUI.scale(2))); panel.add(new JBLabel(labelText, UIUtil.ComponentStyle.SMALL), BorderLayout.NORTH); panel.add(component, BorderLayout.CENTER); return panel; }