Dimension

The Dimension class is similar to the Point class, except it encapsulates a width and height in a single object. Like Point, Dimension is somewhat underused; it is used primarily by methods that need to return a width and a height as a single object; for example, getSize() returns a Dimension object.

Dimension Methods

Variables

A Dimension instance has two variables, one for width and one for height. They are accessible directly or through use of the getSize() method.

Constructors Sizing Miscellaneous methods