/home/cdesrivi/NetBeansProjects/CS1/src/npw/Target.java
 1 /*
 2  * Program to paint the Target icon in the context of the Nonrepresentational
 3  * Paint World, NPW.
 4  */
 5 package npw;
 6 
 7 import java.awt.Color;
 8 import javax.swing.SwingUtilities;
 9 import painter.SPainter;
10 import shapes.SCircle;
11 
12 /**
13  *
14  * @author cdesrivi
15  */
16 public class Target {
17     // THE SOLUTION TO THE BLUE DOT PROBLEM
18 
19     private void paintTheImage() {
20         SPainter klee = new SPainter("Target", 600, 600);
21         SCircle dot1 = new SCircle(200);
22         klee.setColor(Color.RED);
23         klee.paint(dot1);
24         SCircle dot2 = new SCircle(150);
25         klee.setColor(Color.WHITE);
26         klee.paint(dot2);
27         SCircle dot3 = new SCircle(100);
28         klee.setColor(Color.RED);
29         klee.paint(dot3);
30     }
31 
32     // REQUIRED INFRASTRUCTURE
33     public Target() {
34         paintTheImage();
35     }
36 
37     public static void main(String[] args) {
38         SwingUtilities.invokeLater(new Runnable() {
39             public void run() {
40                 new Target();
41             }
42         });
43     }
44 
45 }
46