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