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