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