import java.applet.*;
import java.awt.*;
public class DisplayImageExample extends Applet {
Image img;
MediaTracker tr;
public void paint(Graphics g) {
tr = new MediaTracker(this);
img = getImage(getCodeBase(), "demo_img.jpg");
tr.addImage(img,0);
g.drawImage(img, 0, 0, this);
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.