I am trying to use JFreeChart to create charts obviously. JFreeChart come with ChartFrame and ChartPanel.
I have a class to create the chart itself then in another class i have ChartPanel and add that to a normal JPanel this works so far
by using :
my problem is that when i click the button an try to change the chart displaying it won't do anything i can't think it would be about the class that creates the chart it would be the method of displaying.Code:
ChartPanel chartsPanels = new ChartPanel(charts);
GroupLayout mainPanelLayout = new GroupLayout(chartPanel);
GroupLayout.SequentialGroup hGroup = mainPanelLayout.createSequentialGroup();
GroupLayout.SequentialGroup vGroup = mainPanelLayout.createSequentialGroup();