1 /* 2 *program to make a Target 3 */ 4 package NPW; 5 import java.awt.Color; 6 import javax.swing.SwingUtilities; 7 import painter.SPainter; 8 import shapes.SCircle; 9 10 11 public class Target { 12 13 private void paintTheImage() { 14 SPainter klee = new SPainter("Target", 900,900); 15 SCircle Bdot = new SCircle(400); 16 klee.setColor(Color.RED); 17 klee.paint(Bdot); 18 SCircle Mdot = new SCircle(250); 19 klee.setColor(Color.WHITE); 20 klee.paint(Mdot); 21 SCircle Sdot = new SCircle(100); 22 klee.setColor(Color.RED); 23 klee.paint(Sdot); 24 } 25 public Target() { 26 paintTheImage(); 27 } 28 public static void main (String[] args) { 29 SwingUtilities.invokeLater(new Runnable() { 30 31 public void run() { 32 new Target(); 33 34 } 35 }); 36 } 37 } 38 39 40 41