一个关于事件的问题# Java - 爪哇娇娃
u*r
1 楼
小弟偶在用java做一个电梯的例子。实际的电梯门打开的时候是由硬件产生一个事件,产
生相应动作,偶这个程序要模拟一下这个事件,所以我想用一个变量,每隔100毫秒减1来
表示门关的过程,当变量减到0的时候,产生一个门已经关的事件。程序的其它部分liste
n到这个事件,产生动作。想问一下这个事件在JAVA理如何产生?好象和mouseClicked等
事件还是不太一样。
生相应动作,偶这个程序要模拟一下这个事件,所以我想用一个变量,每隔100毫秒减1来
表示门关的过程,当变量减到0的时候,产生一个门已经关的事件。程序的其它部分liste
n到这个事件,产生动作。想问一下这个事件在JAVA理如何产生?好象和mouseClicked等
事件还是不太一样。