Target.java
1    /* 
2     * Program to paint the Target logo 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       //THE SOLUTION TO THE TARGET PROBLEM
16   
17       private void paintTheImage() {
18           SPainter klee = new SPainter("Target",800,800);
19           SCircle dot = new SCircle(300);
20           klee.setColor(Color.RED);
21           klee.paint(dot);
22           SCircle spot = new SCircle(200);
23           klee.setColor(Color.WHITE);
24           klee.paint(spot);
25           SCircle bullseye = new SCircle(100);
26           klee.setColor(Color.RED);
27           klee.paint(bullseye);
28       }
29   
30       // REQUIRED INFRASTRUCTURE
31   
32       public Target() {
33           paintTheImage();
34       }
35   
36       public static void main(String[] args) {
37           SwingUtilities.invokeLater(new Runnable() {
38               public void run() {
39                   new Target();
40               }
41           });
42       }
43   }