title: Adding a ChartPanel to JPanel
body: <p>I've got some not working code here:</p>
  
  <pre><code>    XYSeriesCollection dataset = new XYSeriesCollection();
      dataset.addSeries(series);
      JFreeChart chart = ChartFactory.createXYLineChart(null, null, null, dataset, PlotOrientation.HORIZONTAL, true, true, true);
      ChartPanel chartpanel = new ChartPanel(chart);
  
      chartpanel.setDomainZoomable(true);
      jPanel4.setLayout(new BorderLayout());
      jPanel4.add(chartpanel, BorderLayout.NORTH);
  </code></pre>
  
  <p>So the problem is that the jPanel4 with a chart is not visible. When I add my chartpanel to a frame and make it visible, it works.</p>
  
  <p>Anyone knows what's my mistake? </p>