Jfreechart annotations disappearing
问题 I plot a curve with JFreechart. Then the user can draw ranges by dragging the mouse. These I plot using AbstractChartAnnotation to draw a filled Path2D. So far so nice - all aligns perfectly with the curve. When an area was already annotated the new annotation gets deleted. I use XYPlot.removeAnnotation with the new annotation. My problem is that sometimes not only the "new" annotation gets removed, but also a second annotation elsewhere in the plot. It doesn't seem random - I kinda found