I'm trying to get multiple jfreecharts displaying within a single window. Apparently this is not possible with the included ChartFrame so I attempted to add multiple copies of the same chart to a JFrame which didn't work. Any ideas?
JFrame frame = new JFrame("Chart");
frame.getContentPane().add(new ChartPanel(chart1));
frame.getContentPane().add(new ChartPanel(chart2));
frame.pack();
frame.setVisible(true);
With this code, I only get one chart in the JFrame.
EDIT: I added another data set and chart but it still only displays one of them.