JComponent () { JPanel panel = new JPanel(new BorderLayout()); panel.add(new JLabel(myRenamer.getDialogDescription()), BorderLayout.CENTER); final DefaultActionGroup actionGroup = new DefaultActionGroup(); actionGroup.addAction(createRenameSelectedAction()).setAsSecondary(true); ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("AutoRenaming", actionGroup, true); toolbar.setTargetComponent(myTable); panel.add(toolbar.getComponent(), BorderLayout.EAST); final Box box = Box.createHorizontalBox(); box.add(panel); box.add(Box.createHorizontalGlue()); return box; }