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