I encounter some problems with JFreeChart, here I explained what I'm creating:Random errors when changing series using JFreeChart. But now I have another related question. I have to ChartPanel in CardLayout to switch between the graphs when I click on tabbed pane. I've tried it with ordinary JPanel (public class JPaintablePanel extends JPanel. It's showing some button with different name depending on the tab), and it works well. But the same thing with public class JPaintablePanel extends ChartPanel is not working, it shows only one graph. Can you tell me how to force ChartPanel to switch, and preserve data?
http://pastebin.com/THuvGan5 ChartPanel
http://pastebin.com/Br2swZiC CardLayout
 
     
     
    