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