Target.java
1    /* 
2    * Program to create the Target logo 
3    */
4    
5    
6    package npw;
7    import java.awt.Color;
8    import javax.swing.SwingUtilities;
9    import painter.SPainter;
10   import shapes.SCircle;
11   
12   public class Target {
13       //The solution to creating the Target Logo
14       private void paintTheImage() {
15           SPainter klee = new SPainter("Target", 600, 600);
16           SCircle dot = new SCircle(180);
17           klee.setColor(Color.red);
18           klee.paint(dot);
19           SCircle circle = new SCircle(120);
20           klee.setColor(Color.white);
21           klee.paint(circle);
22           SCircle oval = new SCircle(60);
23           klee.setColor(Color.red);
24           klee.paint(oval);
25       }
26   
27       // Required infrastructure
28   
29       public Target() {
30           paintTheImage();
31       }
32   
33       public static void main(String[] args) {
34           SwingUtilities.invokeLater(new Runnable() {
35               public void run() {
36                   new Target();
37               }
38           });
39       }
40   }