/* A basic applet that uses simple graphics */ import java.awt.*; import java.applet.Applet; public class Wheel extends Applet { public void paint(Graphics g) { // Set the background to green setBackground(Color.green); // Draw a red filled cirlce/pie g.setColor(Color.red); g.fillArc(50, 50, 120, 120, 20, 40); // Draw a yellow filled cirlce/pie g.setColor(Color.yellow); g.fillArc(50, 50, 120, 120, 60, 40); // Draw a blue filled cirlce/pie g.setColor(Color.blue); g.fillArc(50, 50, 120, 120, 100, 40); // Draw a red filled cirlce/pie g.setColor(Color.red); g.fillArc(50, 50, 120, 120, 140, 40); // Draw a yellow filled cirlce/pie g.setColor(Color.yellow); g.fillArc(50, 50, 120, 120, 180, 40); // Draw a blue filled cirlce/pie g.setColor(Color.blue); g.fillArc(50, 50, 120, 120, 220, 40); // Draw a red filled cirlce/pie g.setColor(Color.red); g.fillArc(50, 50, 120, 120, 260, 40); // Draw a yellow filled cirlce/pie g.setColor(Color.yellow); g.fillArc(50, 50, 120, 120,300, 40); // Draw a blue filled cirlce/pie g.setColor(Color.blue); g.fillArc(50, 50, 120, 120, 340, 40); // set the drawing color to red g.setColor(Color.red); g.drawString("This is my colorful spin-wheel!", 20, 190); } }