1 /* 2 * Assignment #1 - Building the Red Cross using only one rectangular object. 3 */ 4 5 package npw; 6 7 import java.awt.Color; 8 import javax.swing.SwingUtilities; 9 import painter.SPainter; 10 import shapes.SRectangle; 11 12 public class RedCross { 13 private void paintTheImage() { 14 SPainter klee = new SPainter("Red Cross", 600,600); 15 SRectangle cross= new SRectangle(500,100); 16 klee.setColor(Color.RED); 17 klee.paint(cross); 18 19 klee.tl(); 20 klee.paint(cross); 21 22 } 23 24 public RedCross() { 25 paintTheImage(); 26 } 27 28 public static void main(String[] args) { 29 SwingUtilities.invokeLater(new Runnable() { 30 @Override 31 public void run() { 32 new RedCross(); 33 34 } 35 }); 36 } 37 }