/** * Constructs an array of JButtons from the given Action array, * and adds them as a sequence of related buttons separated by a default gap. * * @param actions an array of buttons to add */ public void addButton(Action... actions) { JButton[] buttons = new JButton[actions.length]; for (int i = 0; i < actions.length; i++) { buttons[i] = createButton(actions[i]); } addButtons(buttons); }