I want to connect X and Y coordinates by order which I inputed to make a circle .
I found a program that draw X,Y coordinates in Java . Then I added my data of circle but program connected nearest X,Y coordinates not ordered X,Y .
public Graph(final String title) {
super(title);
final XYSeries series = new XYSeries("Random Data");
series.add(2.000 , 0);
series.add(0 , 2.000);
series.add(-2.000 , 0);
series.add(0 , -2.000);
final XYSeriesCollection data = new XYSeriesCollection(series);
final JFreeChart chart = ChartFactory.createXYLineChart(
"XY Series Demo",
"X",
"Y",
data,
PlotOrientation.VERTICAL,
true,
true,
false
);