@NotThreadSafe public class Windows extends Object
Modifier and Type | Method and Description |
---|---|
static Window |
getLastFocusedWindow()
Returns the last window which received the focus.
|
static Window |
getParentWindow()
Returns a suitable parent window, which is the last explicitly set and
still showing parent window or any of its showing parent windows, the
last focused and still showing window or any of its showing parent
windows or any other showing window - whichever is found first.
|
@Nullable public static Window getLastFocusedWindow()
null
is returned instead.
Note that this is not the same as
Windows.getCurrentKeyboardFocusManager().getFocusedWindow()
:
The latter may return null
if no window in this JVM has the
focus, while this method will return the last window in this JVM which
had the focus (unless this is also the first call to this method).public static Window getParentWindow()
JOptionPane
's root frame is
returned.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.