JComponent (@NlsSafe String name, FileEditor beforeEditor) { JPanel panel = new JPanel(new BorderLayout()); JLabel label = new JBLabel(name, UIUtil.ComponentStyle.SMALL); label.setBorder(JBUI.Borders.empty(1, 4, 2, 0)); panel.add(BorderLayout.NORTH, label); panel.add(BorderLayout.CENTER, beforeEditor.getComponent()); return panel; }