Shape (final Rectangle bounds, Point pointTarget, final BalloonImpl balloon) { pointTarget = new Point(Math.max((int)bounds.getMaxX(), pointTarget.x), pointTarget.y); final Shaper shaper = new Shaper(balloon, bounds, pointTarget, SwingConstants.RIGHT); shaper .lineTo((int)bounds.getMaxX() - shaper.getTargetDelta(SwingConstants.RIGHT) - JBUIScale.scale(1), pointTarget.y + balloon.getPointerWidth(this) / 2); shaper.toBottomCurve().roundLeftDown().toLeftCurve().roundLeftUp().toTopCurve().roundUpRight().toRightCurve().roundRightDown() .lineTo(shaper.getCurrent().x, pointTarget.y - balloon.getPointerWidth(this) / 2).lineTo(pointTarget.x, pointTarget.y).close(); return shaper.getShape(); }