The Dimension class encapsulates width and height in a single object.
public class java.awt.Dimension
extends java.lang.Object
implements java.io.Serializable {
// Variables
public int height;
public int width;
// Constructors
public Dimension();
public Dimension (int width, int height);
public Dimension (Dimension d);
// Instance Methods
public boolean equals (Object obj);
public Dimension getSize();
public void setSize (Dimension d);
public void setSize (int width, int height);
public String toString();
}
The height of the Dimension.
The width of the Dimension.
Constructs an empty Dimension object.
Initial width of the object
Initial height of the object
Constructs a Dimension object with an initial dimension of width x height.
Initial dimensions of the object
Constructs a Dimension object that is a clone of d.

The object to compare.
true if this Dimension is equivalent to obj; false otherwise.
Object.equals(Object)
Compares two Dimension instances.

The size of the Dimension.

The new size.
Changes the size of the Dimension.

The new width.
The new height.
Changes the size of the Dimension.
A string representation of the Dimension object.
Object.toString()
Object, String, Serializable
| This HTML Help has been published using the chm2web software. |