Basic HTML version of Foils prepared 13 July 98

Foil 17 The AWT Rectangle Class

From Java Academy II:Advanced Java NPAC/ECS Java Academy -- February to April 98. by Tom Scavo

java.awt.Rectangle Class
1 In Java, a Rectangle is given by its:
  • top left-hand corner (x, y)
  • width and height
2 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;

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998