void (@NotNull @Nls String message, @NotNull Color color) { Balloon balloon = JBPopupFactory.getInstance().createBalloonBuilder(new JLabel(message)) .setFillColor(color) .setHideOnKeyOutside(true) .createBalloon(); JComponent component = myFileTypePanel.myAssociateButton; RelativePoint relativePoint = new RelativePoint(component, new Point(component.getWidth() / 2, component.getHeight() - JBUI.scale(10))); balloon.show(relativePoint, Balloon.Position.below); }