| 查看: 359 | 回复: 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. |
» 猜你喜欢
321求调剂
已经有5人回复
一志愿中海洋材料工程专硕330分求调剂
已经有7人回复
一志愿天大材料与化工(085600)总分338
已经有5人回复
288求调剂
已经有3人回复
材料080500调剂求收留
已经有4人回复
一志愿吉林大学材料学硕321求调剂
已经有9人回复
294求调剂材料与化工专硕
已经有8人回复
一志愿985,本科211,0817化学工程与技术319求调剂
已经有10人回复
一志愿西安交通大学材料工程专业 282分求调剂
已经有3人回复
332求调剂
已经有3人回复













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