Images
An Image represents a complex image, such as a photograph.
Getting an image from a file:
Image img = Toolkit.getDefaultToolkit()getImage(“image.gif”)
Getting an image from the Net:
URL u = new URL(http://www.someplace.com/image.gif) ;
Image img = Toolkit.getDefaultToolkit()getImage(u) ;
The Image class in java.awt has many methods for images, such as getWidth(imageobserver) and getHeight(imageobserver), which return the width and height in pixels.
Images can be created from either gifs or jpegs.