1 /* 2 * Program to paint the Target logo in the context 3 * of the Nonrepresentational Painting World, NPW. 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 Target { 15 // THE SOLUTION TO THE BLUE DOT PROBLEM 16 private void paintTheImage() { 17 SPainter klee = new SPainter("Target", 600, 600); 18 SCircle dot = new SCircle(200); 19 klee.setColor(Color.RED); 20 klee.paint(dot); 21 22 SCircle alpha = new SCircle(150); 23 klee.setColor(Color.WHITE); 24 klee.paint(alpha); 25 26 SCircle beta = new SCircle(75); 27 klee.setColor(Color.RED); 28 klee.paint(beta); 29 30 } 31 32 //Required Infrastructure 33 34 public Target() { 35 paintTheImage(); 36 } 37 38 public static void main(String[] args) { 39 SwingUtilities.invokeLater(new Runnable() { 40 public void run() { 41 new Target(); 42 } 43 }); 44 } 45 } 46