/* * Program to paint a target in the context of the Nonrepresentational * Painting world, NPW. */ package npw; import java.awt.Color; import javax.swing.SwingUtilities; import painter.SPainter; import shapes.SCircle; public class Target { // THE SOLUTION TO TARGET PROBLEM. private void paintTheImage() { SPainter klee = new SPainter("Red Dot", 600, 600); SCircle dot = new SCircle(200); klee.setColor(Color.RED); klee.paint(dot); SCircle dot1 = new SCircle( 133.33); klee.setColor(Color.WHITE); klee.paint(dot1); SCircle dot2 = new SCircle(66.66); klee.setColor(Color.RED); klee.paint(dot2); } // REQUIRED INFRASTRUCTURE public Target() { paintTheImage(); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { new Target(); } }); } }