/home/sjenks/NetBeansProjects/CS1/src/npw/Target.java
 1 /*
 2  * Program to paint the target icon in the context of the Nonrepresentational
 3  * Painting 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 sjenks
15  */
16 public class Target {
17     //THE SOLUTION TO THE TARGET ICON PROBLEM
18     private void paintTheImage() {
19         SPainter klee = new SPainter("Target",600,600);
20         SCircle dot = new SCircle(300);
21         klee.setColor(Color.RED);
22         klee.paint(dot);
23         SCircle middle = new SCircle(200);
24         klee.setColor(Color.WHITE);
25         klee.paint(middle);
26         SCircle outside = new SCircle(100);
27         klee.setColor(Color.RED);
28         klee.paint(outside);
29         
30     }
31 
32     // REQUIREDINFRASTRUCTURE
33     
34     public Target() {
35         paintTheImage();
36     }
37     
38     public static void main(String[] args) {
39        SwingUtilities.invokeLater(new Runnable() {
40            public void run(){
41                new Target();
42            }
43        });
44     }
45     
46 }
47