The AWT Rectangle Class
In Java, a Rectangle is given by its:
- top left-hand corner (x, y)
- width and height
For example, the following code gets the rectangular dimensions of an applet: int x, y, w, h; Rectangle r = this.getBounds(); x = r.x; y = r.y; w = r.width; h = r.height;