boolean (@Nullable Component c) { if (c == null || !c.isShowing()) { return true; } return c instanceof JFrame || c instanceof JDialog || c instanceof JWindow || c instanceof JRootPane || isFocusProxy(c); }