/* * Program to paint a blue dot 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 THE BLUE DOT PROBLEM private void drawTheImage(){ SPainter klee = new SPainter("Target" , 600 , 600) ; SCircle circle = new SCircle(200) ; klee.setColor(Color.BLUE) ; klee.paint(circle); circle = new SCircle(140); klee.setColor(Color.red) ; klee.paint(circle); circle = new SCircle(80); klee.setColor(Color.blue) ; klee.paint(circle); } // REQUIRED INFRASTRUCTURE public Target(){ drawTheImage(); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { new Target() ; } }); } }