java.awt.Dimension : Dimension « 2D Graphics « Java Tutorial

  1. A Dimension object represents a width and a height in int.
  2. The getWidth and getHeight methods return a double, not an int.
  3. 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.