题目内容:
28. (问答题) import java.awt.*;import java.applet.Applet;
public class DrawMyImage extends Applet
{
Image myImage; // 定义一个图像类Image的对象myImage
public void init( )
{
myImage = getImage(getDocumentBase( ),"pica.jpg");
}
public void paint(Graphics g)
{
g.drawImage(myImage,0,0,this);
}
}(本题8.0分)
参考答案: