RedCross.java
1    /* 
2    * Program to Draw the RedCross. 
3     */
4    
5    package npw;
6    
7    import painter.SPainter;
8    import shapes.SRectangle;
9    import javax.swing.*;
10   import java.awt.*;
11   
12   
13   public class RedCross {
14       private void paintTheImage(){
15           SPainter klee = new SPainter("RedCross", 600, 600);
16           SRectangle rectangle = new SRectangle(500, 100);
17           klee .setColor(Color.red);
18           klee.paint(rectangle);
19           klee.tr();
20           klee.paint(rectangle);
21       }
22   
23       public RedCross (){
24           paintTheImage();
25       }
26       public static void main (String[]args) {
27           SwingUtilities.invokeLater(new Runnable(){
28               public void run () {
29                   new RedCross();
30               }
31   
32           });
33       }
34   
35   }
36   
37