RedCross.java
1    /* 
2     * Program to paint a Red Cross. 
3     */
4    
5    package npw;
6    
7    import java.awt.Color;
8    import javax.swing.SwingUtilities;
9    import painter.SPainter;
10   import shapes.SRectangle;
11   
12   public class RedCross {
13       private void paintTheImage() {
14           SPainter klee = new SPainter("Red Cross",600,600);
15           SRectangle cross = new SRectangle(500,100);
16           klee.setColor(Color.RED);
17           klee.paint(cross);
18           klee.tl();
19           klee.paint(cross);
20       }
21   
22       //Required Infrastructure
23   
24       public RedCross() {
25           paintTheImage();
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   }
36