PieChart - page.fillArc (70, 25, 100, 100, 0, 45);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // PieChart.java Author: Lewis and Loftus // // Solution to Programming Project 2.24 //******************************************************************** / import javax.swing.JApplet; import java.awt.*; i public class PieChart extends JApplet { //----------------------------------------------------------------- // Draws the pie chart with equal sections. //----------------------------------------------------------------- public void paint (Graphics page) { setBackground (Color.lightGray); page.setColor (Color.blue);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: page.fillArc (70, 25, 100, 100, 0, 45); page.setColor (Color.yellow); page.fillArc (70, 25, 100, 100, 45, 45); page.setColor (Color.black); page.fillArc (70, 25, 100, 100, 90, 45); page.setColor (Color.green); page.fillArc (70, 25, 100, 100, 135, 45); page.setColor (Color.red); page.fillArc (70, 25, 100, 100, 180, 45); page.setColor (Color.magenta); page.fillArc (70, 25, 100, 100, 225, 45); page.setColor (Color.cyan); page.fillArc (70, 25, 100, 100, 270, 45); page.setColor (Color.orange); page.fillArc (70, 25, 100, 100, 315, 45); } }...
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online