import java.awt.*;
import java.applet.Applet;
public class displayImage extends Applet {
Image img;
public void init(){
img=getImage(getCodeBase(),"runningman.jpg" );
}
public void paint(Graphics g){
g.drawImage(img,0,0,this);
g.drawImage(img, 90, 0, 300, 62, this);
}
}
hello everyone, the above code aims to get the image of, say, runningman picture downloaded from google image(and I have put it in the directory of the java file) to be displayed in an appletviewer, but when I run the code, it seems that the picture of running man is not coming out. Can someone help me to run the code in their IDE and see what's wrong with the code. Greatly appreciate any help/ guidelines that can be provided.