Java Tutorial/2D Graphics/Dimension
java.awt.Dimension
- A Dimension object represents a width and a height in int.
- The getWidth and getHeight methods return a double, not an int.
- You can construct a Dimension object by using one of its constructors:
public Dimension ()
public Dimension (Dimension d)
public Dimension (int width, int height)
The no-arg constructor create a Dimension with a width and a height of zero.