Null is returned if none of the components in this application has the focus : Focus Event « Event « Java
- Java
- Event
- Focus Event
Null is returned if none of the components in this application has the focus
import java.awt.Component;
import java.awt.KeyboardFocusManager;
public class Main {
public static void main() {
Component compFocusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager()
.getFocusOwner();
}
}
Related examples in the same category