Java in a Nutshell

Previous Chapter 18
The java.awt Package
Next
 

18.19 java.awt.Dimension (JDK 1.0)

This class has two public instance variables that describe the width and height of something. The width and height fields are public and may be manipulated directly.

public class Dimension extends Object implements Serializable {
    // Public Constructors
            public Dimension();
            public Dimension(Dimension d);
            public Dimension(int width, int height);
    // Public Instance Variables
            public int height;
            public int width;
    // Public Instance Methods
        1.1  public boolean equals(Object obj);  // Overrides Object
        1.1  public Dimension getSize();
        1.1  public void setSize(Dimension d);
        1.1  public void setSize(int width, int height);
            public String toString();  // Overrides Object
}

Passed To:

Applet.resize(), Component.resize(), Component.setSize(), Dimension(), Dimension.setSize(), Rectangle(), Rectangle.setSize()

Returned By:

Many methods


Previous Home Next
java.awt.Dialog (JDK 1.0) Book Index java.awt.Event (JDK 1.0)

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java
This HTML Help has been published using the chm2web software.