/home/ecuevas/NetBeansProjects/CS1/src/npw/Target.java
 1 /*
 2  * Program to paint a target.
 3  */
 4 package npw;
 5 
 6 import java.awt.Color;
 7 import javax.swing.SwingUtilities;
 8 import painter.SPainter;
 9 import shapes.SCircle;
10 
11 /**
12  *
13  * @author ecuevas
14  */
15 public class Target {
16     // THE SOLUTION TO THE BLUE DOT PROBLEM
17     private void paintTheImage() {
18         SPainter Klee = new SPainter("Target",600,600);
19         SCircle dot = new SCircle(200);
20         Klee.setColor(Color.RED);
21         Klee.paint(dot); 
22         SCircle dot1 = new SCircle(150);
23         Klee.setColor(Color.WHITE);
24         Klee.paint(dot1);  
25         SCircle dot2 = new SCircle(100);
26         Klee.setColor(Color.RED);
27         Klee.paint(dot2);  
28 
29     }
30     
31     // REQUIRED INFRASTRUCTURE
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