JBPopup (@NotNull @PopupTitle String title, @NotNull JComponent content, @Nullable JComponent preferableFocusComponent) { return JBPopupFactory.getInstance() .createComponentPopupBuilder(content, preferableFocusComponent) .setTitle(title) .setResizable(false) .setModalContext(true) .setFocusable(true) .setRequestFocus(true) .setMovable(true) .setBelongsToGlobalPopupStack(true) .setCancelKeyEnabled(true) .setCancelOnWindowDeactivation(false) .setCancelOnClickOutside(true) .setNormalWindowLevel(true) .createPopup(); }