Target.java
1    package NPW;
2    
3    import painter.SPainter;
4    import shapes.SCircle;
5    
6    import javax.swing.*;
7    import java.awt.*;
8    
9    public class Target {
10   
11   
12   
13   
14       //Solution to the TARGET Problem
15       private void paintIt() {
16           SPainter gogh = new SPainter("Target", 600,600);
17           SCircle dot = new SCircle(100);
18           gogh.setColor(Color.RED);
19           gogh.paint(dot);
20           dot.x2();
21   
22        gogh.paint(dot);
23   gogh.setColor(Color.white);
24   dot.s2();
25   gogh.paint(dot);
26   gogh.setColor(Color.red);
27   dot.s2();
28    gogh.paint(dot);
29       }
30       //REQUIRED INFRASTRUCTURE
31   
32   
33       public Target() {
34           paintIt();
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