JPanel (AnAction[] actions) { JPanel buttonsPanel = new JPanel(new GridLayout(1, actions.length, 5, 0)); for (final AnAction action : actions) { ActionJButton button = new ActionJButton(action); myActions.add(button); buttonsPanel.add(button); } return buttonsPanel; }