1 The method getImage(URL) is undefined for the type Image12 The method drawImage(Image, int, int, ImageObserver) in the type Graphics is not applicable for the arguments (Image, int, int, Image1)2 The method paint(Graphics) in the type Image1 is not applicable for the arguments ()

解决方案 »

  1.   

    呵呵,javainthink好快啊,搂主不需要再翻译成中文了把
      

  2.   

    回复人: hxzg001(丢掉幻想,准备辞职) ( ) 信誉:100
     呵呵,javainthink好快啊,搂主不需要再翻译成中文了把-------------------------------
    晕。我就是楼主。^_^~
      

  3.   

    问题比较大啊
    1。getImage(URL)方法没有定义
    2。drawImage(Image, int, int, ImageObserver)这个方法应该传这样的参数,而你的第四个参数this和方法里面的参数类型不对应
    3。你的类里面的paint(Graphics)是这样定义的,而你调用的是没有参数的paint()方法
      

  4.   

    晕,字面的意思很明显啊
    第一个是getImage(URL)方法没有定义
    第二个是调用Graphics对象的drawImage方法时提供的参数不正确
    第三个是调用Image1对象的paint方法参数不正确这样解释可以吗
      

  5.   

    其实源程序是一个Applet是这样的:import java.applet.*; 
    import java.net.*; 
    import java.awt.*; public class imag extends Applet{ 
     Image image; 
     public void init() { 
      String url = "http://www.google.com/images/logo_sm.gif"; 
      try { 
       image = getImage(new URL(url)); 
      } catch(Exception e){} 
    } public void paint(Graphics g) { 
     g.drawImage(image, 0, 0,this); 
     } 
    } 我不知道怎样修改成Application才能测试成功。
    你们能帮我改一个吗?看来我基础实在是太差了。^_^!
      

  6.   

    特别是那个drawImage里面的ImageObserver参数,看了文档也不太明白什么意思。
    而且getImage()方法不是在文档里本身有的吗?难道还要定义?
      

  7.   

    getImage(URL)是Applet的方法,改成Application就没了.Applet改Application要做很多的.