1 package npw; 2 3 import java.awt.Color; 4 import javax.swing.SwingUtilities; 5 import painter.SPainter; 6 import shapes.SCircle; 7 8 public class Target { 9 10 // THE SOLUTION TO THE TARGET PROBLEM 11 12 private void paintTheImage () { 13 SPainter klee = new SPainter("Target", 600, 600); 14 SCircle dot = new SCircle(200); 15 klee.setColor(Color.RED); 16 klee.paint(dot); 17 18 SCircle dot2 = new SCircle(130); 19 klee.setColor(Color.WHITE); 20 klee.paint(dot2); 21 22 SCircle dot3 = new SCircle(60); 23 klee.setColor(Color.RED); 24 klee.paint(dot3); 25 } 26 // REQUIRED INFRASTRUCTURE 27 28 public Target() { 29 paintTheImage(); 30 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