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