|
Code Samples Index
These code examples and other materials are subject to Sun Microsystems, Inc.
Legal Terms
Loading an Image
// This call returns immediately and pixels
// are loaded in background.
// The following 2 lines of code must be
// on the same line
Image image = Toolkit.getDefaultToolkit().getImage(
"image.gif");
// This method ensures that all pixels have
// been loaded before returning.
image = new ImageIcon("image.gif").getImage();
|
Examplets provided by permission of the publisher, Addision-Wesley,
and Author Patrick Chan.
Order this book from Amazon
|