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