Java Tutorial/2D Graphics/Dimension — различия между версиями

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

Версия 20:44, 31 мая 2010

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.