p.closePath();
// translate origin towards center of canvas
AffineTransform at = new AffineTransform();
at.translate(200.0f, 200.0f);
p.transform(at);
BasicFigure star = new BasicFigure(p);
star.setLineWidth(2);
star.setStrokePaint(Color.blue);
figureLayer.add(star);