[Chapter 18] 18.32 java.awt.Image (JDK 1.0)

#

| Chapter 18 The java.awt Package |

## 18.32 java.awt.Image (JDK 1.0)

###

This abstract class represents a displayable image in a platform-independent way. An `Image` object may not be instantiated directly through a constructor; it must be obtained through a call like `Applet.getImage()` or `Component.createImage()`. `getSource()` method returns the `ImageProducer` object that produces the image data. `getGraphics()` returns a `Graphics` object that can be used for drawing into offscreen images (but not images that are downloaded or generated by an `ImageProducer`).

    public abstract class Image extends Object {
        // Default Constructor: public Image()
        // Constants
            1.1  public static final int SCALE_AREA_AVERAGING;
            1.1  public static final int SCALE_DEFAULT;
            1.1  public static final int SCALE_FAST;
            1.1  public static final int SCALE_REPLICATE;
            1.1  public static final int SCALE_SMOOTH;
                public static final Object UndefinedProperty;
        // Public Instance Methods
                public abstract void flush();
                public abstract Graphics getGraphics();
                public abstract int getHeight(ImageObserver observer);
                public abstract Object getProperty(String name, ImageObserver observer);
            1.1  public Image getScaledInstance(int width, int height, int hints);
                public abstract ImageProducer getSource();
                public abstract int getWidth(ImageObserver observer);
    }

### Passed To:

`Component.checkImage(), Component.imageUpdate(), Component.prepareImage(), ComponentPeer.checkImage(), ComponentPeer.prepareImage(), Frame.setIconImage(), FramePeer.setIconImage(), Graphics.drawImage(), ImageObserver.imageUpdate(), MediaTracker.addImage(), MediaTracker.removeImage(), PixelGrabber(), Toolkit.checkImage(), Toolkit.prepareImage()`

### Returned By:

`Applet.getImage(), AppletContext.getImage(), BeanInfo.getIcon(), Component.createImage(), ComponentPeer.createImage(), Frame.getIconImage(), Image.getScaledInstance(), SimpleBeanInfo.getIcon(), SimpleBeanInfo.loadImage(), Toolkit.createImage(), Toolkit.getImage()`

java.awt.IllegalComponentStateException (JDK 1.1) |  | java.awt.Insets (JDK 1.0)