I'm trying to create a new JFreeChart, i have both JCommon (1.0.22) and JFreeChart (1.0.17-demo) in my Build Path for the project;
However, when i try to create code, in this case;
CategoryDataset dataset = createDataset();
JFreeChart chart = createChart(dataset);
ChartPanel chartPanel = new ChartPanel(chart, false);
chartPanel.setPreferredSize(new Dimension(500, 270));
setContentPane(chartPanel);
I get an Error at "JFreeChart" with no Import option available.
I'm using the guide here:
http://www.java2s.com/Code/Java/Chart/JFreeChartBarChartDemo1.htm
To try and create a Chart (Just to check imports right now) But i can import org.jfree.(anything) like org.jfree.ui
BUT i cannot import org.jfree.chart
As it says it doesn't exist in my libraries. Any ideas?
jfreechart-1.0.17-demo.jar
is the JAR file that contains demo examples, not the actual library.
Look in the lib
folder and use jfreechart-1.0.17.jar
.