/home/kchan2/NetBeansProjects/CS1/src/npw/OrangePlus.java |
1
2
3
4
5
6 package npw;
7
8 import java.awt.Color;
9 import javax.swing.SwingUtilities;
10 import painter.SPainter;
11 import shapes.SRectangle;
12
13
14
15 @author
16
17 public class OrangePlus {
18
19
20
21 private void paintTheImage() {
22 SPainter klee = new SPainter("Orange Plus",600,600);
23 SRectangle rec = new SRectangle(500,100);
24 klee.setColor(Color.ORANGE);
25 klee.paint(rec);
26 rec.shrink(400,-400);
27 klee.paint(rec);
28 }
29
30
31
32 public OrangePlus() {
33 paintTheImage();
34 }
35 public static void main(String[] args) {
36 SwingUtilities.invokeLater(new Runnable() {
37 public void run() {
38 new OrangePlus();
39 }
40 });
41 }
42
43 }
44