Ronald S. Holland
Total Application Works
In this tutorial, we will explore the steps required to create a simple pie chart. There are two ways that we could approach this project. One way would be to create an application; the other way is to create an applet. Since this is a simple pie chart, there will not be a lot of "bells and whistles", and we will wait to read the requirements section to find out how we should approach this project.
The requirements for this project are to:
An application has a main method. If you need more explanation, please refer to
We will be using aspects of the Graphics API, but not the entire API. The Graphics API is the fundamental class for rendering 2-dimensional shapes, text and images on the Java(tm) platform.
This method draws the text given by the specified iterator, using this graphics context's current color.
Using the above methods and the Font class, we will create the Pie Chart Application as shown below.
© 2002 - 2012 All Rights Reserved Total Application Works