Example usage for java.awt Component removeFocusListener

List of usage examples for java.awt Component removeFocusListener

Introduction

In this page you can find the example usage for java.awt Component removeFocusListener.

Prototype

public synchronized void removeFocusListener(FocusListener l) 

Source Link

Document

Removes the specified focus listener so that it no longer receives focus events from this component.

Usage

From source file:edu.ku.brc.ui.UIHelper.java

/**
 * Removes all the focus listeners for a component.
 * @param comp the comp/*from www  .j  a  va  2  s .c  om*/
 */
public static void removeFocusListeners(final Component comp) {
    if (comp != null) {
        for (FocusListener l : comp.getFocusListeners()) {
            comp.removeFocusListener(l);
        }
    }
}