1 /* 2 *Program to paint a Target in the context of the Nonrepresentational 3 * Painting World< NPW 4 */ 5 package npw; 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 14 // THE SOLUTION TO THE BLUE DOT PROBLEM 15 private void paintTheImage() { 16 SPainter klee = new SPainter("Target", 800, 800); 17 SCircle dot = new SCircle(300); 18 klee.setColor(Color.RED); 19 klee.paint(dot); 20 SCircle dot2 = new SCircle(225); 21 klee. setColor(Color.WHITE); 22 klee.paint(dot2); 23 SCircle dot3 = new SCircle(120); 24 klee. setColor(Color.RED); 25 klee.paint(dot3); 26 27 28 } 29 30 // REQUIRED INFRASTRUCTURE 31 32 public Target() { 33 paintTheImage (); 34 } 35 36 public static void main (String [] args) { 37 SwingUtilities.invokeLater(new Runnable() { 38 public void run() { 39 new Target(); 40 } 41 }); 42 } 43 } 44