JPanel (final JBTable packageTable, final PackageEntryTable packageList) { JPanel panel = ToolbarDecorator.createDecorator(packageTable) .setAddAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { addPackageToPackages(packageTable, packageList); } }).setRemoveAction(new AnActionButtonRunnable() { @Override public void run(AnActionButton button) { removeEntryFromPackages(packageTable, packageList); } }).disableUpDownActions().setPreferredSize(new Dimension(-1, 100)).createPanel(); UIUtil.addBorder(panel, IdeBorderFactory.createTitledBorder(JavaBundle.message("title.packages.to.use.import.with"), false)); return panel; }