In the last study, we completed the basic configuration of Java development, then download and install a Java IDE, such as installing MyEclipse 2013 or Eclipse as I do. Next I will run our first Java program with MyEclipse 2013 as an integrated development environment, but it is related to graphics, so we need to refer to the Jfreechart library.
First, create a new Java project
File--->new--->Project;
In the dialog box that appears, select Java Project, then name next, and finally finish.
Second, create a new. Java Program
File--->new--->Class;
Three, Jfreechart installation configuration
Reference Tutorial: http://www.yiibai.com/jfreechart/
Iv. the demo in the anti-compilation Jfreechart package
I think one way to learn Jfreechart is to look at the ... in the bag. Demo.jar, then select one of the demos you need. Then learn the source code of the demo and change it to the way you want it. But obviously, after we unzip, only. jar, no source file, what to do? Of course, the anti-compilation, the following we refer to the experience of predecessors to decompile.
Reference: http://blog.csdn.net/idebian/article/details/41478693
Here we get the source file. How to use the source code under the MyEclipse?
Five, run the demo source
Reference: http://www.cnblogs.com/emanlee/p/4230105.html
Create your own structure, modelled on the project structure created in the link above.
1) Right click on SRC, create a new class, name the demo to run
2) referenced Libraries
"Import *.jar Package", the steps are as follows:
1. Right-click your project
2. Select Build Path
3. Click Add External Archives
4. Select the desired package in the pop-up window and click Next
5. Click Finish
Here, there may be some place in the code is inappropriate, according to the situation, a little adjustment, you can run smoothly. Is that what you are (animated Oh!) )?
Java Learning (iii) running the first Jfreechartdemo program