List of usage examples for java.awt Dialog isVisible
@Transient public boolean isVisible()
From source file:util.ui.UiUtilities.java
/** * Gets the last visible modal child dialog of the specified window. * <p>//w w w . ja v a2 s.c o m * If there is no visible modal child the window itself will be returned. * * @param parent * The window to get the child from. * @return the last visible modal child dialog of the specified window. */ public static Window getLastModalChildOf(Window parent) { Window[] children = parent.getOwnedWindows(); for (Window child : children) { if (child instanceof Dialog) { Dialog dlg = (Dialog) child; if (dlg.isVisible() && dlg.isModal()) { return getLastModalChildOf(dlg); } } } // this is the last window return parent; }