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