Java JButton Settings removeAllActionListeners(AbstractButton btn)

Here you can find the source of removeAllActionListeners(AbstractButton btn)

Description

removes all action listeners from the given button

License

Open Source License

Parameter

Parameter Description
btn a parameter

Declaration

public static void removeAllActionListeners(AbstractButton btn) 

Method Source Code

//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);
        }
    }
}

Related

  1. newTabbedPaneButton(String text)
  2. numberButtonGroup(ButtonGroup buttonGroup)
  3. opacityCheck(AbstractButton b)
  4. paintClassicText(AbstractButton b, Graphics g, int x, int y, String text, int mnemIndex)
  5. parseLevel(ButtonGroup buttonGroup)
  6. removeButtonBorder(AbstractButton button)
  7. removeCloseButton(Component comp)
  8. removeListeners(AbstractButton button)
  9. scaleAllAbstractButtonIconsOf(Container container, int size)