| 查看: 390 | 回复: 0 | ||
m57091003木虫 (著名写手)
|
[求助]
Java applet的运行结果
|
|
public class Example8_2 extends Applet { int initcount=0; int startcount=0; int stopcount=0; int destroycount=0; int paintcount=0; public void init() { initcount++; } public void start() { startcount++; } public void stop() { stopcount++; } public void destroy() { destroycount++; } public void paint(Graphics g) { paintcount++; g.drawString("initcount="+initcount,20,60); g.drawString("startcount="+startcount,20,80); g.drawString("stopcount="+stopcount,20,100); g.drawString("destroycount="+destroycount,20,120); g.drawString("paintcount="+paintcount,20,140); } } 运行结果分别是1,1,0,0,2; 问题是:paintcount每次自增1,为什么出来是2.而且每次窗口移动增量都是2. |
» 猜你喜欢
今年的WR进展到哪一步了?
已经有8人回复
时间戳他又来了
已经有17人回复
系统今天又提示维护了,估计离放榜不远了
已经有9人回复
产物和副产物价值比较
已经有4人回复
这个自发加氧反应的机理是什么?
已经有7人回复
J-J-W不为人知的一面
已经有19人回复
没消息就是被刷了呗
已经有14人回复
微信指数没变化,科研之友没阅读
已经有8人回复
这种情况还有戏吗
已经有11人回复
同事接到电话了,我却没有
已经有4人回复











回复此楼
点击这里搜索更多相关资源