void () { final ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myList) .disableUpAction() .disableDownAction() .setAddAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { addElement(findItemToAdd()); } }); customizeDecorator(decorator); setLayout(new BorderLayout()); add(decorator.createPanel(), BorderLayout.CENTER); if (myTitle != null) { @SuppressWarnings("DialogTitleCapitalization") var outerBorder = IdeBorderFactory.createTitledBorder( myTitle, false, JBInsets.emptyInsets() ).setShowLine(false); setBorder(new CompoundBorder(outerBorder, getBorder())); } }