Java Tutorial/2D Graphics/Dimension

Материал из Java эксперт
Перейти к: навигация, поиск

java.awt.Dimension

  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:



   <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.