Target.java
1    /* 
2     * Program to paint a Target in the context of the Nonrepresentational 
3     * Painting World, NPW. 
4     */
5    package npw;
6    import painter.SPainter;
7    import shapes.SCircle;
8    
9    import javax.swing.*;
10   import java.awt.*;
11   public class Target {
12   // THE SOLUTION TO THE Target PROBLEM
13   
14       private void paintTheImage() {
15           SPainter klee = new SPainter("Target",600,600);
16           SCircle Mary = new SCircle(198);
17           klee.setColor(Color.red);
18           klee.paint(Mary);
19   
20           Mary = new SCircle (132 );
21           klee.setColor(Color.white);
22           klee.paint(Mary);
23   
24           Mary = new SCircle (66);
25           klee.setColor(Color.RED);
26           klee.paint(Mary);
27   
28   
29   
30   
31       }
32       // REQUIRED INFRASTRUCTURE
33       public Target() {
34           paintTheImage();
35       }
36       public static void main(String[] args) {
37           SwingUtilities.invokeLater(new Runnable() {
38               public void run() {
39                   new Target();
40               }
41           });
42       }
43   }
44   
45   
46   
47   
48   
49   
50   
51   
52