Target.java
1    /* 
2    *Creating a red target using the blue dot as an example 
3     */
4    
5    package NPW;
6    
7    import java.awt.Color;
8    import javax.swing.SwingUtilities;
9    import painter.SPainter;
10   import shapes.SCircle;
11   import shapes.SSquare;
12   
13   public class Target {
14   
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           SCircle smallDot = new SCircle(133.33);
21           klee.setColor(Color.WHITE);
22           klee.paint(smallDot);
23           SCircle redDot = new SCircle(66.66);
24           klee.setColor(Color.RED);
25           klee.paint(redDot);
26   
27       }
28   
29   
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