为什么Applet程序在JCreator中和用IE执行时的效果不一样?
就是这个程序:import java.awt.*;
import java.applet.*;
public class appletLifeCircle extends Applet
{
int initCounter=0;
int startCounter=0;
int stopCounter=0;
int destroyCounter=0;
public void init()
{
initCounter++;
}
public void start()
{
startCounter++;
}
public void stop()
{
stopCounter++;
}
public void destroy()
{
destroyCounter++;
}
public void paint(Graphics g)
{
g.drawString("init has been invoked"+String.valueOf(initCounter)+" times ",20,20);
g.drawString("start has been invoked"+String.valueOf(startCounter)+" times ",20,30);
g.drawString("stop has been invoked"+String.valueOf(stopCounter)+" times ",20,40);
g.drawString("destroy has been invoked"+String.valueOf(destroyCounter)+" times ",20,50);
}
}
在JCreator中运行后,将窗口不断最小化再恢复可以看到 initCounter,startCounter,stopCounter,destroyCounter 的变化,但是用IE却看不到这种效果,数值始终不变,这是怎么原因?
[此贴子已经被作者于2006-2-24 7:10:41编辑过]