本意是在图片加载的时候逐渐显示图片,为此还特意Thread.sleep()了下,但结果是加载时并没有画出来,加载完后才显示
出来,  查到  
 在AWT构件中,有下面的两个系统属性影响图像的重画特征:
  awt.image.incrementalDraw
  awt.image.redrawrate
  如果awt.image.incrementalDraw的值是false,则表示即使当它们的位发生改变时图
像不会被持续地画出;只有图像被完全加载后,图像才会显示出来。
  awt.image.redrawrate决定动画的速率,其单位是ms。如果不设置该属性的话,其缺
省值为100ms。但还是搞不出来,求帮助
代码:import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Image;public class ImageTestAppletWithDynamicUpdate extends Applet {
private Image im;public void init() {
im = getImage(getCodeBase(), "scrotest\\11.png");System.out.print ("Image width=" + im.getWidth(this));
System.out.println(" height=" + im.getHeight(this));//System.setProperty("java.awt.image.incrementalDraw", "true");
//System.out.println(System.getProperty("java.awt.image.incrementalDraw"));}
public void paint(Graphics g) {
g.drawImage(im,0,0,this);
}
public boolean imageUpdate(Image image, int flags, 
int x, int y, int w, int h)
{
try{
Thread.sleep(50);
}
catch(Exception e){
System.out.println(e.toString());
}
System.out.println("imageUpdate(): x=" + x + ", y=" + 
y + " w=" + w + ",h=" + h);
repaint();if((flags & ALLBITS) == 0) 
return true; // need more updates 
else 
return false; // image is fully loaded
}
}