package npw; import painter.SPainter; import shapes.SRectangle; import javax.swing.*; import java.awt.*; public class RedCross { private void paintTheImage(){ SPainter painter = new SPainter("Red Cross", 600,600); SRectangle cross = new SRectangle(500,100); painter.setColor(Color.RED); painter.paint(cross); //This one paints the diagonal rectangle. painter.tl(); //Turns the painter left and makes the horizontal rectangle. painter.paint(cross); } public RedCross(){ paintTheImage(); } public static void main(String[] args){ SwingUtilities.invokeLater(new Runnable(){ public void run(){ new RedCross(); } }); } }