/* / This program is to be demonstrated in the attempt to / paint a red cross in the NPW (Nonrepresentational Painting World) */ package npw; import java.awt.Color; import javax.swing.SwingUtilities; import painter.SPainter; import shapes.SRectangle; public class RedCross { // THE SOLUTION TO THE RED CROSS PROBLEM private void paintTheImage() { SPainter Michael = new SPainter("Red Cross", 600,600); SRectangle cross = new SRectangle(500,100); Michael.setColor(Color.RED); Michael.paint(cross); Michael.tl(); Michael.paint(cross); } // REQUIRED INFRASTRUCTURE public RedCross() { paintTheImage(); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new RedCross(); } }); } }