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