/*ch0908.java*/
import java.awt.*;
import java.applet.*;
import java.net.*;

public class ch0908 extends Applet
{ public void paint(Graphics g)
  { try
    {
      URL picur1=new URL("file:/f:xiyang.jpg");  //图像在本地计算机的f盘
      Image img=getImage(picur1);
      int width=img.getWidth(this);
      int height=img.getHeight(this);
      g.drawImage(img,10,10,width/2,height/2,this);
     }
    catch(MalformedURLException e)
    {
      g.drawString("Can't Found the Picture",10,10);
    }
  }
}


