RedCross.java
1    package npw;
2    
3    
4    import painter.SPainter;
5    import shapes.SRectangle;
6    
7    import javax.swing.*;
8    import java.awt.*;
9    
10   public class RedCross {
11   
12       private void paintTheImage() {
13           SPainter man = new SPainter("Red Cross", 600 , 600);
14           SRectangle fred = new SRectangle(500,100);
15           SRectangle steve =  new SRectangle(100,500);
16           man.setColor(Color.RED);
17           man.paint(fred);
18           man.paint(steve);
19       }
20   
21       public RedCross() { paintTheImage(); }
22   
23       public static void main(String[] args) {
24           SwingUtilities.invokeLater(new Runnable() {
25               public void run() {new RedCross(); }
26           });
27       }
28   }
29