JComponent () { final JPanel mainPanel = new JPanel(new BorderLayout()); // important: do not allow to remove or change macro name for already defined macros befor project is loaded myEditor = new PathMacroListEditor(myUndefinedMacroNames); final JComponent editorPanel = myEditor.getPanel(); mainPanel.add(editorPanel, BorderLayout.CENTER); final JLabel textLabel = new JLabel(myText); textLabel.setUI(new MultiLineLabelUI()); textLabel.setBorder(JBUI.Borders.empty(6, 6, 6, 6)); mainPanel.add(textLabel, BorderLayout.NORTH); return mainPanel; }