Professional Documents
Culture Documents
Technology
MINI
PROJECT
REPORT
SI No
1
Name
Abhishek D Jayakar
USN
2SD13CS006
2
3
Dhanya S Wajapey
Jishnu Rao
2SD13CS040
2SD13CS048
NaveenKumar
Yaragall
2SD13CS068
Project By
GUIDE CERTIFICATE
Date: 08-03-16
Project Co-ordinator
Place: Dharwad
Prof.S.M.Joshi
ACKNOWLEDGEMENT
2) Loading an Image
3) Displaying an Image
Creating an Image:
In Java the image is painted on window. This is
done by creating an instance of Image. Image class
needs information about the environment to create
proper data format for screen. For this purpose
'createImage()' method is used.
Example: Image myImage =
createImage(280,100);
The above line creates an instance of Image with
width 280p and height 100p
Loading an Image
After creating an instance of Image class, the
required Image needs to be loaded to the created
object. This is done using the getImage() method.
Example: myImage =
getImage((getDocumentBase(),
"sample.png"));
Displaying an Image
After loading an image, it needs to be drawn on the
window. This is carried out using the 'drawImage()'
method.
Example: drawImage(myImage, 10,50,this);
myImage = getImage(getDocumentBase(),
"sample.png");
}
public void paint(Graphics g){
g.drawImage(myImage,50,50,this);
}
}
The I2T
2)Frame 2
The I2T
3)Frame 3
The I2T