Java Applets
Definition of Applet :
It is program that can be embedded in HTML documents. It is useful to make website entertaining and more attractive. We can include chat feature using java applet. It runs in the browsers like internet explorer and mozilla, these browsers supports java features.
It can be downloaded here free. http://java.sun.com/j2se/.
A simple program how to display image file using Java applet :
import java.applet.*;
import java.awt.*;
public class appletImage extends Applet{
Image img;
MediaTracker tr;
public void paint(Graphics g) {
tr = new MediaTracker(this);
img = getImage(getCodeBase(), "myimage.gif");
tr.addImage(img,0);
g.drawImage(img, 0, 0, this);
}
}
Subscribe to:
Post Comments (Atom)
1 comments:
very informative site.... keep it up...
Post a Comment