Example usage for java.awt Component getFocusListeners

List of usage examples for java.awt Component getFocusListeners

Introduction

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

Prototype

public synchronized FocusListener[] getFocusListeners() 

Source Link

Document

Returns an array of all the focus listeners registered on 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 ava2s  . com
 */
public static void removeFocusListeners(final Component comp) {
    if (comp != null) {
        for (FocusListener l : comp.getFocusListeners()) {
            comp.removeFocusListener(l);
        }
    }
}