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