1 package npw; 2 3 4 import java.awt.Color; 5 import javax.swing.SwingUtilities; 6 import painter.SPainter; 7 import shapes.SRectangle; 8 9 10 11 public class RedCross { 12 // Solution To Red Cross Problem 13 14 private void paintTheImage(){ 15 SPainter klee = new SPainter("Red Cross",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 } 24 25 // REQUIRED INFRASTRUCTURE 26 27 public RedCross() { 28 paintTheImage(); 29 30 } 31 32 public static void main(String[] args) { 33 SwingUtilities.invokeLater(new Runnable() { 34 public void run() { 35 new RedCross(); 36 } 37 }); 38 } 39 }