I have created a Path of Bézier curves and it works fine to draw the path. But I don't know How I can draw the Control Points together with the Path. Is that possible or do I have to keep track of them in another datastructure?
Update: The reason to why I want to draw the control points, is that I will let the user to edit the curves using handles on the control points.
I am creating the path with:
Path2D.Double path = new Path2D.Double();
path.moveTo(0,0);
path.curveTo(5, 6, 23, 12, 45, 54);
path.curveTo(34, 23, 12, 34, 2, 3);
And drawing it with:
g2.draw(path);
I have tested with PathIterator as trashgod suggested, but it will be hard to manage the curves that way if I want the user to be able to edit the control points.