Java JButton Settings addActionListeners(AbstractButton button, ActionListener[] listeners)

Here you can find the source of addActionListeners(AbstractButton button, ActionListener[] listeners)

Description

add Action Listeners

License

Open Source License

Declaration

public static void addActionListeners(AbstractButton button,
            ActionListener[] listeners) 

Method Source Code

//package com.java2s;
/*//from  w w w  . j av a 2s  .co m
 * SK's Minecraft Launcher
 * Copyright (C) 2010-2014 Albert Pham <http://www.sk89q.com> and contributors
 * Please see LICENSE.txt for license information.
 */

import javax.swing.*;

import java.awt.event.ActionListener;

public class Main {
    public static void addActionListeners(AbstractButton button,
            ActionListener[] listeners) {
        for (ActionListener listener : listeners) {
            button.addActionListener(listener);
        }
    }
}

Related

  1. addAbstractButtonListeners(AbstractButton b, Object... objs)
  2. addActionListener(ActionListener listener, AbstractButton... buttons)
  3. addActionListenerToButtons(ActionListener l, AbstractButton... components)
  4. addButton(ActionListener l, Container container, String name, String cmd)
  5. addButton(Container component, String text, Icon icon, ActionListener listener, String actionCommand)
  6. addButton(String name, JPanel panel, ActionListener action)