Java Tutorial/2D Graphics/Dimension

Материал из Java эксперт
Версия от 18:25, 31 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

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.