Target.java
1    /* 
2     * Program to paint a target in the context of the nonrepresentational painting world, npw 
3     */
4    
5    package npw;
6    
7    import painter.SPainter;
8    import shapes.SCircle;
9    
10   import javax.swing.*;
11   import java.awt.*;
12   
13   public class Target {
14       //THE SOLUTION TO THE TARGET PROBLEM
15       private void paintTheImage(){
16           SPainter klee = new SPainter("Target",600,600);
17           SCircle dot = new SCircle(200);
18           klee.setColor(Color.RED);
19           klee.paint(dot);
20           dot.setRadius(130);
21           klee.setColor(Color.white);
22           klee.paint(dot);
23           dot.setRadius(70);
24           klee.setColor(Color.red);
25           klee.paint(dot);
26       }
27       //REQUIRED INFRASTRUCTURE
28       public Target(){
29           paintTheImage();
30       }
31       public static void main(String[] args){
32           SwingUtilities.invokeLater(new Runnable() {
33               public void run(){
34                   new Target();
35               }
36           });
37       }
38   
39   }
40