1 /* 2 * Program to paint a blue dot in the context of the Nonrepresentational Painting World, NPW. 3 */ 4 5 6 package npw; 7 8 import painter.SPainter; 9 import shapes.SCircle; 10 11 import javax.swing.*; 12 import java.awt.*; 13 14 public class BlueDot { 15 // solution to blue dot problem 16 17 private void paintTheImage() { 18 SPainter yo = new SPainter("Blue Dot", 600,600); 19 SCircle notdot = new SCircle(200); 20 yo.setColor(Color.BLUE); 21 yo.paint(notdot); 22 23 } 24 //required infrastructure 25 public BlueDot() { 26 paintTheImage(); 27 28 } 29 public static void main(String[] args) { 30 SwingUtilities.invokeLater(new Runnable() { 31 public void run() { 32 new BlueDot(); 33 34 } 35 36 }); 37 } 38 } 39 40