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