/home/ecuevas/NetBeansProjects/CS1/src/npw/OrangePlus.java
 1 /*
 2  * Program to create an orange plus using only one rectangle.
 3  */
 4 package npw;
 5 
 6 import java.awt.Color;
 7 import javax.swing.SwingUtilities;
 8 import painter.SPainter;
 9 import shapes.SCircle;
10 import shapes.SRectangle;
11 
12 /**
13  *
14  * @author ecuevas
15  */
16 public class OrangePlus {
17     // THE SOLUTION TO THE ORANGE PLUS PROBLEM
18     private void paintTheImage() {
19         SPainter Klee = new SPainter("Orange Plus",600,600);
20         SRectangle box = new SRectangle(500,100);
21         Klee.setColor(Color.orange);
22         Klee.paint(box);
23         Klee.tl(); 
24         Klee.paint(box);
25        
26         
27         
28     }
29     
30     // REQUIRED INFRASTRUCTURE
31     
32     public OrangePlus() {
33         paintTheImage();
34     }
35     
36     public static void main(String[] args) {
37         SwingUtilities.invokeLater(new Runnable() {
38             public void run() {
39                 new OrangePlus();
40             }
41          });      
42     }
43 }
44     
45   
46