1 /* 2 *Program to paint a Target in the context of the Nonrepresentational paining world 3 */ 4 5 package npw; 6 7 import painter.SPainter; 8 import shapes.SCircle; 9 10 import javax.swing.*; 11 import java.awt.*; 12 13 public class Target { 14 //THE SOLUTION TO THE BLUE DOT PROBLEM 15 16 private static 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 SCircle dot2 = new SCircle(130); 22 klee.setColor(Color.WHITE); 23 klee.paint(dot2); 24 SCircle dot3 = new SCircle(75); 25 klee.setColor(Color.RED); 26 klee.paint(dot3); 27 } 28 29 //REQUIRED INFRASTRUCTURE 30 public Target() { 31 paintTheImage(); 32 } 33 34 public static void main(String[] args){ 35 SwingUtilities.invokeLater(new Runnable() { 36 public void run() { 37 new Target(); 38 } 39 }); 40 } 41 } 42