title: Saving jfreechart as jpeg shows repeating legend
body: <p>I have a created a Jfreechart and I'm trying to convert as an image.</p>
  
  <pre><code>JFrame frame = new JFrame("Chart");
  frame.getContentPane().add(new ChartPanel(chart), BorderLayout.CENTER);
  frame.pack();
  frame.setVisible(true);
  createImage(chart);
  
  //createImage method
  
  public static void createImage(JFreeChart chart){
  try{
      ChartUtilities.saveChartAsJPEG(new    File("chartImage.jpeg"),chart,800,600);   
  }
  catch (Exception e) {
      e.printStackTrace();
  }
  </code></pre>