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   
11   import painter.SPainter;
12   import painter.SPainter;
13   import shapes.SCircle;
14   import shapes.SCircle;
15   
16   public class Target{
17       //THE SOLUTION TO THE TARGET PROBLEM
18   
19       private void paintTheImage() {
20           SPainter klee = new SPainter("Target",600,600);
21           SCircle dot1 = new SCircle(200);
22           klee.setColor(Color.RED);
23           klee.paint(dot1);
24           dot1.s2();
25           klee.setColor(Color.WHITE);
26           klee.paint(dot1);
27           dot1.s3();
28           klee.setColor(Color.RED);
29           klee.paint(dot1);
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