GreenT.java
1    /* 
2     * Program to paint a blue dot in the context of the Nonrepresentational 
3     * Painting World, NPW. 
4     */
5    package npw;
6    
7    import java.awt.*;
8    import javax.swing.SwingUtilities;
9    import painter.SPainter;
10   import shapes.SRectangle;
11   
12   public class GreenT {
13       // The solution to the Green T problem
14       private void paintTheImage() {
15           SPainter klee = new SPainter("Green T",600,600);
16           // Painting the first part of the rectangle
17           SRectangle gt = new SRectangle(400,100);
18           klee.setColor(Color.GREEN);
19           klee.paint(gt);
20           klee.tl(); // tilts rectangle
21           klee.mlt(-200); // moves the rectangle right
22           klee.paint(gt);
23       }
24       //Required infrastructure
25       public GreenT() {
26           paintTheImage();
27       }
28       public static void main(String[]args) {
29           SwingUtilities.invokeLater(new Runnable() {
30               public void run(){
31                   new GreenT();
32               }
33           });
34       }
35   }
36