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
JTabbedPane
is that. The idea behind aJTabbedPane
is that you have a component on each tab, and you switch between these components by clicking on the tabs. Not sure what you try to do with thatCardLayout
inside aJTabbedPane
– Epps