Example usage for javax.swing JComponent isFocusOwner

List of usage examples for javax.swing JComponent isFocusOwner

Introduction

In this page you can find the example usage for javax.swing JComponent isFocusOwner.

Prototype

public boolean isFocusOwner() 

Source Link

Document

Returns true if this Component is the focus owner.

Usage

From source file:org.openmicroscopy.shoola.agents.fsimporter.chooser.ImportDialog.java

/**
 * Handles <code>Enter</code> key pressed.
 * //w  ww.j  a v a2 s. c  o  m
 * @param source
 *            The source of the mouse pressed.
 */
private void handleEnterKeyPressed(Object source) {
    if (source instanceof JList || source instanceof JTable) {
        JComponent c = (JComponent) source;
        if (c.isFocusOwner())
            showLocationDialog();
    }
}