图片没完全加载完之前就是返回false呀,图象加载是需要时间的.

解决方案 »

  1.   

    那应该怎么解决了,等待么。我用了ImageObserver(),再imageUpdate(...)里重画了,可是还出不来,正确的方法应该是什么,其实图片很小
      

  2.   

    这个问题我也碰到过,找了好久我才找到原因:记住一点:一个 Graphics2D 对象只有在控件显示的时候才会创建,如果你要是在控件显示之前调用的相关的东西,肯定是不会成功的.
      

  3.   

    Image image=new ImageIcon(url).getImage();
    image will be fully loaded before next statement. Then drawImage().