Target.java
1    /* 
2    * Target 
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   
12   public class Target {
13   
14       //The solution to the target problem
15   
16       private void paintTheImage() {
17           SPainter klee = new SPainter("Target", 600, 600);
18           SCircle dot = new SCircle(300);
19           klee.setColor(Color.RED);
20           klee.paint(dot);
21   
22           SCircle dot2 = new SCircle(200);
23           klee.setColor(Color.WHITE);
24           klee.paint(dot2);
25   
26           SCircle dot3= new SCircle(100);
27           klee.setColor(Color.RED);
28           klee.paint(dot3);
29       }
30   
31       //Required Infastructure
32   
33       public Target() {
34           paintTheImage();
35       }
36   
37       public static void main(String[] args) {
38           SwingUtilities.invokeLater(new Runnable() {
39               public void run() {
40                   new Target();
41               }
42           });
43       }
44   
45   
46   
47   
48   
49   
50   
51   
52   }
53