1 /* 2 *Program to paint a target in the context of the Nonrepresentational 3 *Painting World, NPW. 4 */ 5 6 7 package npw; 8 import java.awt.Color; 9 import javax.swing.SwingUtilities; 10 import painter.SPainter; 11 import shapes.SCircle; 12 13 public class Target { 14 // THE SOLUTION OF THE TARGET PROBLEM 15 private void paintTheImage(){ 16 SPainter klee = new SPainter("Target", 650, 650); 17 SCircle dot = new SCircle(300); 18 klee .setColor(Color.red); 19 klee.paint(dot); 20 21 SCircle dot2= new SCircle(200); 22 klee.setColor(Color.white); 23 klee.paint(dot2); 24 25 SCircle dot3 = new SCircle(100); 26 klee.setColor(Color.red ); 27 klee.paint(dot3); 28 } 29 public Target(){ 30 paintTheImage(); 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 41 }