title: For loop to create multiple series with JFreeChart
body: <p>Is there any way to make a lot of new series for JFreeChart by using a for loop? 
  I tried something like this. I know that does't work; but if you tell me some other way or maybe fix my code, I would appreciate it.</p>
  
  <pre><code>for(int i=0;i&lt;10;i=i){
  
      String series[]=new String[10];
      String dataset[]=new String[10];
                      series[i]="series"+i;
                      dataset[i]="dataset"+i;
  
      final XYSeries series[i] = new XYSeries("XYGraph");
  
      XYSeriesCollection dataset[i] = new XYSeriesCollection();
      dataset[i].addSeries(series[i]);
      chart.getXYPlot().setDataset(i-1,dataset[i]);
  
      series[i].add(i,2); 
      series[i].add(i,-2);        
  
       i=i+1;
       }
  }
  </code></pre>