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