JBPopup (@Nullable Component parent) { if (parent == null) return null; List<JBPopup> popups = getChildPopups(parent); for (JBPopup each : popups) { if (each.isFocused()) return each; if (each.isDisposed()) continue; JBPopup childFocusedPopup = getChildFocusedPopup(each.getContent()); if (childFocusedPopup != null) { return childFocusedPopup; } } return null; }