Here you can find the source of removeAllListeners(JComboBox box)
public static void removeAllListeners(JComboBox box)
//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); } } }