1 /* 2 * Creating a Target based on the Blue Dot program. 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 { 13 private void paintTheImage() { 14 SPainter klee = new SPainter("Target" , 600,600); 15 SCircle BigRed = new SCircle(200); 16 klee.setColor(Color.RED); 17 klee.paint(BigRed); 18 19 // Building the white circle for the target 20 21 SCircle white = new SCircle(150); 22 klee.setColor(Color.WHITE); 23 klee.paint(white); 24 25 // Building the small red circle for the target 26 27 SCircle SmallRed = new SCircle(100); 28 klee.setColor(Color.RED); 29 klee.paint(SmallRed); 30 } 31 32 public Target() { 33 paintTheImage(); 34 } 35 36 public static void main(String[] args) { 37 SwingUtilities.invokeLater(new Runnable() { 38 @Override 39 public void run() { 40 new Target(); 41 } 42 }); 43 } 44 } 45