Example usage for javax.swing JComboBox getActionListeners

List of usage examples for javax.swing JComboBox getActionListeners

Introduction

In this page you can find the example usage for javax.swing JComboBox getActionListeners.

Prototype

@BeanProperty(bound = false)
public ActionListener[] getActionListeners() 

Source Link

Document

Returns an array of all the ActionListeners added to this JComboBox with addActionListener().

Usage

From source file:Main.java

public Main() {
    JComboBox jc = new JComboBox();
    jc.addItem("France");
    jc.addItem("Germany");
    jc.addItem("Italy");
    jc.addItem("Japan");
    jc.addItemListener(this);
    add(jc);// w  ww  .  j  a  v  a 2 s .  co  m
    ActionListener[] lis = jc.getActionListeners();
}

From source file:grafix.telas.TelaComparativos.java

private void removerListener(JComboBox combo) {
    try {//from w w  w  .ja  va 2  s .c o  m
        combo.removeActionListener(combo.getActionListeners()[0]);
    } catch (Exception e) {
    }
}