DimensionNameDimension
DescriptionThe Dimension class encapsulates width and height in a single object. Class Definition
public class java.awt.Dimension extends java.lang.Object implements java.io.Serializable { // Variables public int height; public int width; // Constructors public Dimension(); public Dimension (int width, int height); public Dimension (Dimension d); // Instance Methods public boolean equals (Object obj); public Dimension getSize(); public void setSize (Dimension d); public void setSize (int width, int height); public String toString(); } Variablesheightpublic int heightThe height of the Dimension. widthpublic int widthThe width of the Dimension. ConstructorsDimensionpublic Dimension()
public Dimension (int width, int height)
public Dimension (Dimension d)
Instance Methodsequalspublic boolean equals (Object obj)
getSizepublic Dimension getSize()
setSizepublic void setSize (Dimension d)
public void setSize (int width, int height)
toStringpublic String toString()
See AlsoObject, String, Serializable |
|