Target.java
1    package npw;
2    
3    import java.awt.Color;
4    import javax.swing.SwingUtilities;
5    
6    import painter.SPainter;
7    import shapes.SCircle;
8    
9    public class Target {
10   
11       private void paintTheImage() {
12           SPainter jlaw = new SPainter("Target", 600, 600);
13           SCircle dot = new SCircle(200);
14           jlaw.setColor(Color.RED);
15           jlaw.paint(dot);
16   
17           SCircle dot2 = new SCircle(140);
18           jlaw.setColor(Color.WHITE);
19           jlaw.paint(dot2);
20   
21           SCircle dot3 = new SCircle(70);
22           jlaw.setColor(Color.RED);
23           jlaw.paint(dot3);
24       }
25   
26       public Target() {
27           paintTheImage();
28       }
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   }
40