Target.java
1    package npw;
2    import java.awt.Color;
3    import javax.swing.SwingUtilities;
4    import painter.SPainter;
5    import shapes.SCircle;
6    
7    public class Target {
8        // THE SOLUTION TO THE Target PROBLEM
9        private void paintTheImage() {
10           SPainter klee = new SPainter("Target",1000,1000);
11           {SCircle dot = new SCircle(300);
12           klee.setColor(Color.RED);
13           klee.paint(dot);}
14           {
15               SCircle dot = new SCircle(200);
16               klee.setColor(Color.WHITE);
17               klee.paint(dot);
18           }
19           {SCircle dot = new SCircle(100);
20               klee.setColor(Color.red);
21               klee.paint(dot);}
22       }
23   
24   
25   
26       // REQUIRED INFRASTRUCTURE
27       public Target() {
28           paintTheImage();
29       }
30       public static void main(String[] args) {
31           SwingUtilities.invokeLater(new Runnable() {
32               public void run() {
33                   new Target();
34               }
35           });
36       }
37   }
38   
39