Target.java
1    /* 
2     * Program to paint a Target logo in the context of the Nonrepresentational 
3     * Painting World, NPW. 
4    * */
5    
6    package npw;
7    
8    import painter.SPainter;
9    import shapes.SCircle;
10   
11   import javax.swing.*;
12   import java.awt.*;
13   
14   public class Target {
15   
16       private void paintTheImage() {
17           // Define the canvas
18           SPainter klee = new SPainter("Paint red Target logo", 600, 600);
19           SCircle dot = new SCircle(200);
20           klee.setColor(Color.RED);
21           klee.paint(dot);
22   
23           // PAINT THIRD OUT WHITE CIRCLE
24           SCircle dot3 = new SCircle(135);
25           klee.setColor(Color.WHITE);
26           klee.paint(dot3);
27   
28           // PAINT SECOND SMALL INNER CIRCLE
29           SCircle dot2 = new SCircle(60);
30           klee.setColor(Color.RED);
31           klee.paint(dot2);
32       }
33   
34       public Target() {
35           paintTheImage();
36       }
37   
38       public static void main(String[] args) {
39           SwingUtilities.invokeLater(new Runnable() {
40               public void run() {
41                   new Target();
42               }
43           });
44   
45       }
46   }
47