RedCross.java
1    /* 
2     *Program to paint a red cross in the context of the Nonrepresentational 
3     * Painting World, NPW. 
4     */
5    package npw;
6    import java.awt.Color;
7    import javax.swing.SwingUtilities;
8    import painter.SPainter;
9    import shapes.SRectangle;
10   
11   public class RedCross {
12       //Solution to the Blue Dot Problem
13       private void paintTheCross() {
14           SPainter jf = new SPainter("Red Cross", 600,600);
15           SRectangle cross = new SRectangle(500,100);
16           jf.setColor(Color.red);
17           jf.paint(cross);
18           jf.tr();
19           jf.paint(cross);
20       }
21       //REQUIRED INFRASTRUCTURE
22   
23   
24       public RedCross() {
25           paintTheCross();
26       }
27   
28       public static void main(String[] args){
29           SwingUtilities.invokeLater(new Runnable() {
30               public void run() {
31                   new RedCross();
32               }
33           });
34       }
35   }