RedCross.java
1    /* 
2    *   Creating a RedCross for Assignment 1 
3    */
4    package npw;
5    
6    import java.awt.Color;
7    import javax.swing.SwingUtilities;
8    import painter.SPainter;
9    import shapes.SRectangle;
10   
11   public class RedCross {
12   
13       // The RedCross Symbol Assignment
14       private void paintTheImage() {
15           SPainter Bobby = new SPainter("Red Cross", 600, 600);
16           SRectangle cross = new SRectangle(500,100);
17           Bobby.setColor(Color.RED);
18           Bobby.paint(cross);
19           Bobby.setHeading(90);
20           Bobby.paint(cross);
21       }
22       //Place all RedCross into paintTheImage!
23       //REQUIRED INFRASTRUCTURE
24   
25       public RedCross() {
26           paintTheImage();
27       }
28   
29       public static void main(String[] args) {
30           SwingUtilities.invokeLater(new Runnable () {
31               public void run() {
32                   new RedCross();
33               }
34           }) ;
35       }
36   }
37   
38