1 /* 2 * Target symbol 3 */ 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 {// THE SOLUTION TO THE BLUE DOT PROBLEM 13 private void paintTheImage() { 14 SPainter klee = new SPainter("Target",600,600); 15 SCircle dot = new SCircle(200); 16 klee.setColor(Color.RED); 17 klee.paint(dot); 18 SCircle dot2 = new SCircle(125); 19 klee.setColor(Color.WHITE); 20 klee.paint(dot2); 21 SCircle dot3 = new SCircle(50); 22 klee.setColor(Color.RED); 23 klee.paint(dot3); 24 } 25 26 //REQUIRED INFRASTRUCTURE 27 28 public Target() { 29 paintTheImage(); 30 } 31 32 public static void main(String[] args) { 33 SwingUtilities.invokeLater(new Runnable() { 34 public void run() { 35 new Target(); 36 } 37 }); 38 } 39 } 40