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