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