/home/dmaslows/NetBeansProjects/CS1/src/npw/PumpItUp.java
 1 /*
 2  * Program to paint a weird square in the context of the Nonrepresentational
 3  * Painting World, NPW.
 4  */
 5 
 6 package npw;
 7 
 8 import java.awt.Color;
 9 import javax.swing.SwingUtilities;
10 import painter.SPainter;
11 import shapes.SSquare;
12 
13 /**
14  *
15  * @author blue
16  */
17 public class PumpItUp {
18 // THE SOLUTION TO THE PumpItUp PROBLEM
19     
20 private void paintTheImage() {
21     SPainter wumbo = new SPainter("Pump It Up",600,600);
22     SSquare square = new SSquare(150);
23     wumbo.setColor(Color.LIGHT_GRAY);
24     wumbo.mbk(150);
25     wumbo.paint(square);
26     wumbo.mfd(300);
27     wumbo.paint(square);
28     wumbo.mbk(150);
29     wumbo.mlt(150);
30     wumbo.paint(square);
31     wumbo.mrt(300);
32     wumbo.paint(square);
33     wumbo.setColor(Color.YELLOW);
34     wumbo.mlt(150);
35     wumbo.paint(square);
36     wumbo.mfd(150);
37     wumbo.mlt(150);
38     wumbo.setColor(Color.RED);
39     wumbo.paint(square);
40     wumbo.mrt(300);
41     wumbo.paint(square);
42     wumbo.mbk(300);
43     wumbo.setColor(Color.BLUE);
44     wumbo.paint(square);
45     wumbo.mlt(300);
46     wumbo.paint(square);
47 }
48 
49 // REQUIRED INFRASTRUCTURE
50 
51 public PumpItUp() {
52     paintTheImage();
53 }
54 
55     public static void main(String[] args) {
56         SwingUtilities.invokeLater(new Runnable() {
57             public void run() {
58                 new PumpItUp();
59             }
60         });
61     }
62     
63 }
64