BlueDot.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    import java.awt.Color;
8    import javax.swing.SwingUtilities;
9    import painter.SPainter;
10   import shapes.SCircle;
11   public class BlueDot {
12       // THE SOLUTION TO THE BLUE DOT PROBLEM
13       private void paintTheImage() {
14           SPainter klee = new SPainter("Blue Dot",600,600);
15           SCircle dot = new SCircle(200);
16           klee.setColor(Color.BLUE);
17           klee.paint(dot);
18       }
19       // REQUIRED INFRASTRUCTURE
20       public BlueDot() {
21           paintTheImage();
22       }
23       public static void main(String[] args) {
24           SwingUtilities.invokeLater(new Runnable() {
25               public void run() {
26                   new BlueDot();
27               }
28           });
29       }
30   }
31