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