1 /* 2 * Program to paint a red cross in the context of the Nonrepresentational 3 * Painting World, NPW. 4 */ 5 6 package npw; 7 8 import java.awt.Color; 9 import javax.swing.SwingUtilities; 10 import painter.SPainter; 11 import shapes.SRectangle; 12 13 public class RedCross { 14 private void paintTheImage() { 15 SPainter Amee = new SPainter("Red Cross",600,600); 16 SRectangle Soobin = new SRectangle (100,500); 17 Amee.setColor(Color.RED); 18 Amee.paint(Soobin); 19 Amee.tl(); Amee.paint(Soobin); 20 } 21 // REQUIRED INFRASTRUCTURE 22 public RedCross(){ 23 paintTheImage(); 24 } 25 26 public static void main(String[] args) { 27 SwingUtilities.invokeLater(new Runnable() { 28 public void run() { 29 new RedCross(); 30 } 31 }); 32 } 33 }