/* * Program to paint red cross in the context of the Nonrepresentational * Painting world, NPW. */ package npw; import java.awt.Color; import javax.swing.SwingUtilities; import painter.SPainter; import shapes.SRectangle; public class RedCross { //THE SOLUTION TO THE BLUE DOT PROBLEM private void paintTheImage() { SPainter RC = new SPainter("RedCross", 600, 600); SRectangle rectangle = new SRectangle(500,100); RC.setColor(Color.RED); RC.paint(rectangle); RC.tl(90); RC.paint(rectangle); } // REQUIRED INFRASTRUCTURE public RedCross() { paintTheImage(); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { new RedCross(); } }); } }