Java KeyboardFocusManager .getFocusedWindow ()
Syntax
KeyboardFocusManager.getFocusedWindow() has the following syntax.
public Window getFocusedWindow()
Example
In the following code shows how to use KeyboardFocusManager.getFocusedWindow() method.
/* w w w . j a v a 2s . c o m*/
import java.awt.KeyboardFocusManager;
import java.awt.Window;
public class Main {
public static void main() {
Window windowFocusOwner =
KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »