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 10 11 private void paintTheImage() { 12 SPainter klee = new SPainter("Red Cross", 600, 600); 13 SRectangle R1 = new SRectangle(100, 500); 14 klee.setColor(Color.RED); 15 klee.paint(R1); 16 klee.tl(); 17 klee.paint(R1); 18 19 20 } 21 22 public RedCross() { 23 paintTheImage(); 24 } 25 26 public static void main(String[] args) { 27 SwingUtilities.invokeLater(new Runnable() { 28 @Override 29 public void run() {new RedCross();} { 30 31 } 32 }); 33 34 } 35 36 37 }