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 Target problem
11       private void paintTheImage()
12       {
13           SPainter klee = new SPainter("Target", 800, 800);
14           SCircle dot = new SCircle(300);
15           klee.setColor(Color.RED);
16           klee.paint(dot);
17   
18           SPainter jim = new SPainter("Target", 800, 800);
19           SCircle loop = new SCircle(200);
20           klee.setColor(Color.WHITE);
21           klee.paint(loop);
22   
23           SPainter kyle = new SPainter("Target", 800, 800);
24           SCircle point = new SCircle(100);
25           klee.setColor(Color.RED);
26           klee.paint(point);
27   
28       }
29       //Required Infrastructure
30       public Target()
31       {
32           paintTheImage();
33       }
34   
35       public static void main(String[] args)
36       {
37           SwingUtilities.invokeLater(new Runnable()
38           {
39               public void run()
40               {
41                   new Target();
42               }
43           });
44       }
45   }