RedCross.java
1    package npw;
2    
3    import java.awt.Color;
4    import javax.swing.SwingUtilities;
5    import painter.SPainter;
6    
7    import shapes.SPolygon;
8    import shapes.SRectangle;
9    
10   public class RedCross {
11   
12   
13   
14   
15   
16   
17   
18           private void paintTheImage() {
19               SPainter klee = new SPainter("Red Cross",600,600);
20              SRectangle cross =  new SRectangle( 500,100);
21               klee.setColor(Color.red);
22               klee.paint(cross);
23            klee.tl();
24               klee.paint(cross);
25   
26   
27   
28   
29           }
30   
31   
32   
33   
34   
35   
36   
37   
38   
39   
40           // required infrastructure
41   
42           public RedCross() {
43   
44               paintTheImage();
45   
46   
47   
48   
49           }
50   
51   
52           public static void main(String[] args)  {
53               SwingUtilities.invokeLater(new Runnable() {
54                   public void run() {
55                       new RedCross();
56                   }
57   
58   
59               });
60           }
61   
62   
63       }
64   
65   
66   
67   
68   
69   
70   
71   
72   
73   
74   
75   
76   
77   
78   
79   
80   
81   
82   
83   
84