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