1 /* 2 * Paints a target 3 */ 4 5 6 package npw; 7 8 import java.awt.Color; 9 import javax.swing.SwingUtilities; 10 import painter.SPainter; 11 import shapes.SCircle; 12 13 public class Target { 14 // THE SOLUTION TO THE BLUE DOT PROBLEM 15 private void paintTheImage(){ 16 SPainter klee = new SPainter("Target", 600, 600); 17 SCircle Target = new SCircle(200); 18 klee.setColor(Color.RED); 19 klee.paint(Target); 20 klee.setColor(Color.WHITE); 21 Target.setRadius(130); 22 klee.paint(Target); 23 klee.setColor(Color.RED); 24 Target.setRadius(200/3); 25 klee.paint(Target); 26 } 27 28 // REQUIRED INFRASTRUCTURE 29 public Target(){ 30 paintTheImage(); 31 } 32 33 public static void main(String[] args){ 34 SwingUtilities.invokeLater(new Runnable(){ 35 public void run() { 36 new Target(); 37 } 38 }); 39 } 40 } 41