Balloon (@NotNull JRootPane pane, @NotNull Disposable parentDisposable, @NotNull JComponent content) { content.putClientProperty(InfoAndProgressPanel.FAKE_BALLOON, new Object()); Balloon balloon = JBPopupFactory.getInstance().createBalloonBuilder(content) .setFadeoutTime(0) .setFillColor(Gray.TRANSPARENT) .setShowCallout(false) .setBorderColor(Gray.TRANSPARENT) .setBorderInsets(JBInsets.emptyInsets()) .setAnimationCycle(0) .setCloseButtonEnabled(false) .setHideOnClickOutside(false) .setDisposable(parentDisposable) .setHideOnFrameResize(false) .setHideOnKeyOutside(false) .setBlockClicksThroughBalloon(true) .setHideOnAction(false) .setShadow(false) .createBalloon(); BalloonLayoutImpl balloonLayout = getBalloonLayout(pane); if (balloonLayout != null) { final class MyListener implements JBPopupListener, Runnable { @Override public void beforeShown(@NotNull LightweightWindowEvent event) { balloonLayout.addListener(this); } @Override public void onClosed(@NotNull LightweightWindowEvent event) { balloonLayout.removeListener(this); } @Override public void run() { if (!balloon.isDisposed()) { balloon.revalidate(); } } } balloon.addListener(new MyListener()); } return balloon; }