Java JButton Settings addActionListener(ActionListener listener, AbstractButton... buttons)

Here you can find the source of addActionListener(ActionListener listener, AbstractButton... buttons)

Description

add Action Listener

License

Open Source License

Declaration

public static void addActionListener(ActionListener listener, AbstractButton... buttons) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.event.ActionListener;

import javax.swing.AbstractButton;

import javax.swing.JComboBox;

public class Main {
    public static void addActionListener(ActionListener listener, JComboBox... components) {
        for (JComboBox component : components) {
            component.addActionListener(listener);
        }//from   w  ww  .j  a  v a  2 s . c  om
    }

    public static void addActionListener(ActionListener listener, AbstractButton... buttons) {
        for (AbstractButton button : buttons) {
            button.addActionListener(listener);
        }
    }
}

Related

  1. addAbstractButtonListeners(AbstractButton b, Object... objs)
  2. addActionListeners(AbstractButton button, ActionListener[] listeners)
  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)