RelativePoint (@NotNull Balloon balloon) { RelativePoint point = RelativePoint.getSouthEastOf(consoleComponent); Insets shadowInsets = balloon instanceof BalloonImpl ? ((BalloonImpl)balloon).getShadowBorderInsets() : JBInsets.emptyInsets(); Dimension balloonContentSize = JBDimension.create(balloon.getPreferredSize(), true); JBInsets.removeFrom(balloonContentSize, shadowInsets); // compensate "-shift.top" from BalloonImpl.Below.getShiftedPoint(java.awt.Point, java.awt.Insets) point.getPoint().y += shadowInsets.top; int spacingFromEdges = JBUIScale.scale(12); point.getPoint().translate(-balloonContentSize.width / 2 - spacingFromEdges, -balloonContentSize.height / 2 - spacingFromEdges); return point; }