Target.java
1    /* 
2        Program to paint a blue dot in the context of the Nonrepresentational Painting World, NPW. 
3     */
4    package npw;
5    import java.awt.Color;
6    import javax.swing.SwingUtilities;
7    import painter.SPainter;
8    import shapes.SCircle;
9    public class Target {
10       //The Solution to the blue dot problem
11       private void paintTheImage() {
12           SPainter klee = new SPainter("Target", 1000, 1000);
13           SCircle large = new SCircle(300);
14           klee.setColor(Color.RED);
15           klee.paint(large);
16           SCircle medium= new SCircle(200);
17           klee.setColor(Color.WHITE);
18           klee.paint(medium);
19           SCircle small = new SCircle(100);
20           klee.setColor(Color.RED);
21           klee.paint(small);
22       }
23   
24       //required infrastructure
25       public Target() {
26           paintTheImage();
27       }
28   
29       public static void main(String[] args) {
30           SwingUtilities.invokeLater(new Runnable() {
31               public void run() {
32                   new Target();
33               }
34           });
35       }
36   }