Java examples for Swing:JWindow
Returns the window that is currently the focus owner.
//package com.java2s; import java.awt.*; public class Main { /**//from w w w . j a v a 2 s. c om * Returns the window that is currently the focus owner. May be null if no * window owns the focus. * @return The window that currently owns the focus, or null. */ static public Window focusedWindow() { return KeyboardFocusManager.getCurrentKeyboardFocusManager() .getFocusedWindow(); } }