[英]How come i can import org.jfree.ui, but not org.jfree.chart?
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; 我正在尝试创建一个新的JFreeChart,在该项目的构建路径中同时包含JCommon(1.0.22)和JFreeChart(1.0.17-demo);
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. 我在“ JFreeChart”处收到一个错误,没有可用的导入选项。
I'm using the guide here: 我在这里使用指南:
http://www.java2s.com/Code/Java/Chart/JFreeChartBarChartDemo1.htm 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 尝试创建图表(现在只需检查导入),但是我可以导入org.jfree。(任何东西),例如org.jfree.ui
BUT i cannot import org.jfree.chart 但是我无法导入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. jfreechart-1.0.17-demo.jar
是包含演示示例而非实际库的JAR文件。
Look in the lib
folder and use jfreechart-1.0.17.jar
. 在lib
文件夹中查找并使用jfreechart-1.0.17.jar
。
two library is needed: 需要两个库:
(the demo jar is not library. it's a great sample of outputs you can have.) (演示jar不是库。它是您可以提供的大量输出示例。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.