This section simply display the image demo that means multiple images and its name are based on the frame to a particular location. For displaying images demo first of all you will need multiple images that have to be displayed on the frame. The following program displays the images and its name on the frame by using the Toolkit, getImage(), drawString() and drawImage() methods.
Description of code:
drawImage(Image img, int x, int y, ImageObserver
This method used to draw an image that have to used in it. It takes the following parameters:
is an image that have to be drown.
x: This is the x coordinate.
y: This is the y coordinate.
ob: This is an object that have to be notified as more of the image is converted.
Here is the code of program:
Output of Program:
Posted on: March 13, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles