Java JComboBox Event addActionListener(ActionListener listener, JComboBox... components)

Here you can find the source of addActionListener(ActionListener listener, JComboBox... components)

Description

add Action Listener

License

Open Source License

Declaration

public static void addActionListener(ActionListener listener, JComboBox... components) 

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  av a  2 s .co m
    }

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

Related

  1. addActionListeners(JComboBox comboBox, ActionListener[] listeners)
  2. createComboBox(String actionCommand, ActionListener listener, String... items)
  3. createComboBox(TYPE[] items, ActionListener... listeners)
  4. installComboBoxCopyAction(JComboBox comboBox)