To create an Image
instance from an ImageProducer
instance, you must use methods associated with the Toolkit
class, which specializes in providing connections between your Java
program and operating-system mechanisms, such as those that actually spray
images on your display.
You obtain a required Toolkit
instance by way of a class method,
getDefaultToolkit
, which returns the appropriate,
operating-systemspecific toolkit:
Toolkit tk = Toolkit.getDefaultToolkit()