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