/* * Program to paint a Red Cross in the context of 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 klee = new SPainter("Thing 1",600,600); SRectangle Leg1 = new SRectangle(500, 100); klee.setColor(Color.RED); klee.paint(Leg1); SRectangle Leg2 = new SRectangle(100, 500); klee.setColor(Color.RED); klee.paint(Leg2); } //REQUIRED INFRASTRUCTURE public RedCross(){ paintTheImage(); } public static void main(String[]args){ SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new RedCross(); } }); } }