/* program to draw a redcross using only one rectangle */ package npw; import painter.SPainter; import shapes.SCircle; import shapes.SRectangle; import javax.swing.*; import java.awt.*; public class RedCross { //solution to the red cross problem private void paintTheImage(){ SPainter klee = new SPainter("Redcross",600,600); SRectangle dot = new SRectangle(500,100); klee.setColor(Color.red); klee.paint(dot); klee.tl(); klee.paint(dot); } //required redcross() public RedCross(){ paintTheImage(); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { new RedCross(); } }); } }