Displaying Bitmapped Images

The drawImage() method of the Graphics class displays bitmapped images. It has many forms that take various arguments. In its simplest form, the drawImage() method takes as its arguments an object of the Image class, an object that implements the ImageObserver interface, and the x-,y-coordinate where the image is to be displayed.

Image is an abstract class that provides format-independent access to graphical images. Image objects are created by invoking methods of other classes that create images. Examples of these image-creating methods are the createImage() methods of the Component and Toolkit classes and the getImage() methods of the Toolkit and Applet classes. The getImage() methods are the best for retrieving ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.