Target.java
1    /* 
2     *Program to paint a blue dot in the context of the Nonrepresentational 
3     * Painting World, NPW 
4     */
5    
6    package npw;
7    
8    import java.awt.Color;
9    import javax.swing.SwingUtilities;
10   import painter.SPainter;
11   import shapes.SCircle;
12   
13   public class Target {
14       // THE SOLUTION TO THE BLUE DOT PROBLEM
15       private void paintTheImage() {
16           SPainter klee = new SPainter("Target",600,600);
17           SCircle dot = new SCircle(150);
18           klee.setColor(Color.RED);
19           klee.paint(dot);
20   
21   
22           SCircle whitedot = new SCircle(100);
23           klee.setColor(Color. WHITE);
24           klee.paint(whitedot);
25   
26   
27           SCircle reddot = new SCircle(50);
28           klee.setColor(Color. RED);
29           klee.paint(reddot);
30   
31   
32       }
33       // REQUIRED INFRASTRUCTURE
34   
35       public void icon() {
36           paintTheImage();
37       }
38   
39       public static void main(String[] args) {
40           SwingUtilities.invokeLater(new Runnable() {
41               public void run() {
42                   new Target();
43               }
44           });
45       }
46   }