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