Replace java.awt.geom.Point2D with javax.vecmath.Point2d;