河南成教 / Java程序设计
[填空题] 以下小应用程序运行后显示一幅图片。
import java.applet.*;
import java.awt.*;
public class Class3005 extends Applet
{
Image myImg;
public void start()
{
myImg=(getCodeBase(),"myImg.jpg");
}
public void paint(Graphics g)
{
g.(myImg,0,0,this);
}
}
import java.applet.*;
import java.awt.*;
public class Class3005 extends Applet
{
Image myImg;
public void start()
{
myImg=(getCodeBase(),"myImg.jpg");
}
public void paint(Graphics g)
{
g.(myImg,0,0,this);
}
}
参考答案: