PositionAdjuster (JBPopup hint) { final Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); if (focusOwner == null) return null; JBPopup popup = PopupUtil.getPopupContainerFor(focusOwner); if (popup != null && popup != hint && !popup.isDisposed()) { return new PositionAdjuster(popup.getContent()); } final Component existing = discoverPopup(LangDataKeys.POSITION_ADJUSTER_POPUP, focusOwner); if (existing != null) { return new PositionAdjuster2(existing, discoverPopup(LangDataKeys.PARENT_POPUP, focusOwner)); } return null; }