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 private void paintTheImage(){ 10 SPainter klee = new SPainter("Red Cross", 600,600); 11 SRectangle redcross = new SRectangle(500, 100); 12 klee.setColor(Color.RED); 13 klee.paint(redcross); 14 klee.tl(); 15 klee.paint(redcross); 16 } 17 public RedCross() { paintTheImage();} 18 19 public static void main(String[] args) { 20 SwingUtilities.invokeLater(new Runnable() { 21 public void run() { new RedCross();} 22 }); 23 } 24 } 25