Target.java
1    /* 
2     * Program to paint the Target 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   public class Target {
13       private Object SPainter;
14   
15       // THE SOLUTION TO THE TARGET PROBLEM
16       private void paintTheImage() {
17           SPainter klee = new SPainter("Target", 600, 600);
18           SCircle dot = new SCircle(200);
19           SCircle dot2 = new SCircle(133);
20           SCircle dot3 = new SCircle(67);
21           klee.setColor(Color.RED);
22           klee.paint(dot);
23           klee.setColor(Color.WHITE);
24           klee.paint(dot2);
25           klee.setColor(Color.RED);
26           klee.paint(dot3);
27       }
28       // REQUIRED INFRASTRUCTURE
29       public Target(){
30           paintTheImage();
31       }
32       public static void main(String[] args){
33           SwingUtilities.invokeLater(new Runnable() {
34               public void run() {
35                   new Target();
36               }
37           });
38       }
39   }
40