Here you can find the source of removeAllActionListeners(AbstractButton btn)
Parameter | Description |
---|---|
btn | a parameter |
public static void removeAllActionListeners(AbstractButton btn)
//package com.java2s; //it under the terms of the GNU Affero General Public License as published by import java.awt.event.ActionListener; import javax.swing.AbstractButton; public class Main { /**//w w w . j a va 2 s. c o m * removes all action listeners from the given button * @param btn */ public static void removeAllActionListeners(AbstractButton btn) { for (ActionListener al : btn.getActionListeners()) { btn.removeActionListener(al); } } }