void (@NotNull @NlsContexts.PopupContent String message, @NotNull MessageType messageType) { BalloonBuilder balloonBuilder = JBPopupFactory.getInstance() .createHtmlTextBalloonBuilder(message, messageType.getDefaultIcon(), messageType.getPopupBackground(), null); balloonBuilder.setFadeoutTime(5000); final Balloon balloon = balloonBuilder.createBalloon(); Point pointOnComponent = new Point(myToolbar.getWidth() / 4, myToolbar.getHeight() / 4); balloon.show(new RelativePoint(myToolbar, pointOnComponent), Balloon.Position.above); Disposer.register(ApplicationManager.getApplication(), balloon); }