/home/mbilodea/NetBeansProjects/CS1/src/npw/OrangePlus.java
 1 /*
 2  * Program to paint an orange plus 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 /**
13  *
14  * @author mbilodea
15  */
16 public class OrangePlus {
17 
18 // THE SOLUTION TO THE ORANGE PLUS PROBLEM
19     
20 private void paintTheImage() {
21     SPainter klee = new SPainter("Orange Plus",600,600);
22     SRectangle plus = new SRectangle(500,100);
23     klee.setColor(Color.ORANGE);
24     klee.paint(plus);
25     klee.tl();
26     klee.paint(plus);
27 }
28     
29 // REQUIRED INFRASTRUCTURE
30 
31 public OrangePlus() {
32     paintTheImage();
33 }
34 
35     public static void main(String[] args) {
36         SwingUtilities.invokeLater(() -> {
37             OrangePlus orangePlus = new OrangePlus();
38         });  
39     }
40     
41 }
42