void (@NotNull JComponent content, @NotNull JComponent focus, boolean requestFocus) { ComponentPopupBuilder builder = JBPopupFactory.getInstance().createComponentPopupBuilder(content, focus); builder.addListener(new JBPopupListener() { @Override public void onClosed(@NotNull LightweightWindowEvent event) { myProgressPanel.hideProcessPopup(); } }); builder.setNormalWindowLevel(true); builder.setMovable(true); builder.setResizable(true); builder.setTitle(IdeBundle.message("progress.window.title")); builder.setCancelOnClickOutside(false); builder.setRequestFocus(requestFocus); builder.setBelongsToGlobalPopupStack(false); builder.setMinSize(new JBDimension(300, 100)); Component frame = ComponentUtil.findUltimateParent(myProgressPanel.getComponent$intellij_platform_ide_impl()); Project project = null; if (frame instanceof IdeFrame ideFrame) { project = ideFrame.getProject(); } builder.setDimensionServiceKey(project, DIMENSION_SERVICE_KEY, true); builder.setLocateWithinScreenBounds(false); builder.setCancelButton(new MinimizeButton(IdeBundle.message("tooltip.hide"))); myPopup = builder.createPopup(); }