Java JComboBox removeAllListeners(JComboBox box)

Here you can find the source of removeAllListeners(JComboBox box)

Description

remove All Listeners

License

Apache License

Declaration

public static void removeAllListeners(JComboBox box) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.awt.event.ActionListener;
import java.awt.event.ItemListener;
import javax.swing.JButton;
import javax.swing.JComboBox;

public class Main {
    public static void removeAllListeners(JButton bouton) {
        for (ActionListener al : bouton.getActionListeners()) {
            bouton.removeActionListener(al);
        }//from w w  w . j  a  v  a  2 s . co m
    }

    public static void removeAllListeners(JComboBox box) {
        for (ItemListener al : box.getItemListeners()) {
            box.removeItemListener(al);
        }
    }
}

Related

  1. makeJComboBox(ResourceBundle resource, String panelName, String keyword)
  2. makeSquare(JComboBox... comboBoxes)
  3. newCombo(int chars)
  4. prepareComboBox(JComboBox comboBox, Dimension size, int min, int max, int[] list)
  5. registerBrowseButtonListener(final JComboBox comboBox, final JButton button, final boolean chooseFile, final boolean isOpen, final FileFilter fileFilter, final File initialDirectory)
  6. resetComboBoxInfo(JComboBox jComboBoxField, ArrayList comboBoxArray, String expression)
  7. resetPhaseBox(JComboBox phaseBox)
  8. setColorMenu(JComboBox choice)
  9. setComboBoxTheme(JComboBox comboBox)