Target.java
1    package npw;
2    /* 
3     *Program to paint a Target in the context of the nonrepresentational 
4     * Painting World, NPW 
5     */
6    
7    
8    import java.awt.Color;
9    import javax.swing.SwingUtilities;
10   import painter.SPainter;
11   import shapes.SCircle;
12   
13   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(250);
18           klee.setColor(Color.RED);
19           klee.paint(dot);
20   
21           SCircle dot2 = new SCircle(150);
22           klee.setColor(Color.WHITE);
23           klee.paint(dot2);
24   
25           SCircle dot3 = new SCircle(60);
26           klee.setColor(Color.RED);
27           klee.paint(dot3);
28       }
29       // REQUIRED INFRASTRUCTURE
30       public Target() {
31           paintTheImage();
32       }
33       public static void main(String[]args) {
34           SwingUtilities.invokeLater(new Runnable() {
35               public void run() {
36                   new Target();
37   
38   
39               }
40           });
41       }
42   }