#,#", "#,#" or "# #" format.
to specify the width, then height of the dimension.Dimension class encapsulates the width and
height of a component (in integer precision) in a single object.
The class is
associated with certain properties of components. Several methods
defined by the Component class and the
LayoutManager interface return a
Dimension object.
Normally the values of width
and height are non-negative integers.
The constructors that allow you to create a dimension do
not prevent you from setting a negative value for these properties.
If the value of width or height is
negative, the behavior of some methods defined by other objects is
undefined.
| Attribute Summary | ||
|---|---|---|
| Attribute | Type | Description |
| height | <int> | The height dimension; negative values can be used. |
| size | <dimension> | Sets the size of this Dimension object to the specified size.
|
| size | Dimension2D | Sets the size of this Dimension2D object to
match the specified size.
|
| width | <int> | The width dimension; negative values can be used. |