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:
<source lang="java">
public Dimension () public Dimension (Dimension d) public Dimension (int width, int height)</source>
The no-arg constructor create a Dimension with a width and a height of zero.