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