1 /* 2 *program to paint a target icon in the context of the nonrepresentational 3 * Painting World, NPW. 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 private void paintTheImage() { 15 SPainter klee = new SPainter("Red Dot", 600, 600); 16 SCircle dot = new SCircle(200); 17 klee.setColor(Color.RED); 18 klee.paint(dot); 19 SCircle white = new SCircle(140); 20 21 22 klee.setColor(Color.WHITE); 23 klee.paint(white); 24 SCircle mid = new SCircle(75); 25 klee.setColor(Color.RED); 26 klee.paint(mid); 27 } 28 public Target(){ 29 paintTheImage(); 30 } 31 public static void main(String[] args) { 32 SwingUtilities.invokeLater(new Runnable(){ 33 public void run() { 34 new Target(); 35 } 36 }); 37 } 38 } 39