Java JButton removeAllActionListeners(JButton button)

Here you can find the source of removeAllActionListeners(JButton button)

Description

remove All Action Listeners

License

Open Source License

Declaration

public static void removeAllActionListeners(JButton button) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static void removeAllActionListeners(JButton button) {
        ActionListener[] listeners = button.getActionListeners();
        for (int i = 0; i < listeners.length; i++) {
            button.removeActionListener(listeners[i]);
        }/*w  ww.  jav a2  s.  co  m*/
    }
}

Related

  1. normalizeComponentDimension(JComponent[] jButtonList)
  2. nullifyButtonUI(final JButton button)
  3. orderOKCancelButtons(JButton okButton, JButton cancelButton)
  4. reduceNimbusButtonMargin(final JButton button)
  5. registerCancelButton(final JButton cancelButton)
  6. removeAllListeners(JButton bouton)
  7. removeMargins(JButton button)
  8. renderImageOnly(JButton button)
  9. setButtonNo(JButton anButton)