问答题
import java. applet. *;
import java. awt. *;
/*
<applet code="ex4_7.class",width=800 height=400>
</applet>
*/
public class ex4_7 extends Applet{
private |mage ilmg;
private int xPos,yPos;
public void init(){
xPos = yPos= (1) ;
ilmg=getlmage( (2) "ex4_7.jpg");
}
publicvoid paint(Graphics g){
g. drawlmage(ilmg,xPos,yPos, (3) );
}
public boolean (4) (Evente,int x,int y){
xPos=x;
yPos=y;
(5) ;
return true;
}
}
ex4_7. html
<HTML>
<HEAD>
<TITLE> ex4_7 </TITLE>
</HEAD>
<BODY>
<appletcode=" ex4_7. class" width =800 height =400 >
</applet>
</BODY>
</HTML>