| 查看: 413 | 回复: 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. |
» 猜你喜欢
极限拉扯,如何抉择
已经有16人回复
40+中年人失业后,还能找到好工作吗?
已经有16人回复
人工智能虚构史料、伪造文献频现,多家期刊声明抵制
已经有4人回复
CsPbI2Br全无机钙钛矿SEM图像异常分析
已经有8人回复
用NBS溴化时溶剂除了CCl4外还有什么
已经有9人回复
二审4个多月了还是Awaiting Reviewer Scores
已经有5人回复
申请科研项目纯靠实力能成功吗?
已经有12人回复










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