Component (final DataKey<JBPopup> datakey, Component focusOwner) { if (focusOwner == null) { focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); } if (focusOwner == null) return null; final DataContext dataContext = DataManager.getInstance().getDataContext(focusOwner); final JBPopup popup = datakey.getData(dataContext); if (popup != null && popup.isVisible() && !popup.isDisposed()) { return popup.getContent(); } return null; }