List of usage examples for javax.swing JComponent isFocusOwner
public boolean isFocusOwner()
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(); } }