在netbeans中实现计时器 [英] implement timer in netbeans
本文介绍了在netbeans中实现计时器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是java的初学者,我想连续检查一些变量的状态,因为我需要一个计时器,任何人都可以帮助实现计时器。
i am a beginner to java,i want check status of some variable continuously,for that i need a timer, can anyone help to implement timer.
推荐答案
http://docs.oracle.com/javase/6/docs/api/ java / util / Timer.html [ ^ ]
并查看此示例: http://blog.mynotiz.de/programmieren/java-countdown-und-timer-am-beispiel-von-swing-1707/ [ ^ ]
其余部分留给你和你的作业;)
http://docs.oracle.com/javase/6/docs/api/java/util/Timer.html[^]
and check out this example: http://blog.mynotiz.de/programmieren/java-countdown-und-timer-am-beispiel-von-swing-1707/[^]
The rest should be left to you and your homework;)
另一个首选方法是java TimerTask。
http://docs.oracle.com/javase/6/docs/api/java/util/TimerTask.html [<一个href =http://docs.oracle.com/javase/6/docs/api/java/util/TimerTask.html\"target =_ blanktitle =New Window> ^ ]
它与Timer相同。
Another preferred approach is java TimerTask.
http://docs.oracle.com/javase/6/docs/api/java/util/TimerTask.html[^]
It works same as Timer.
这篇关于在netbeans中实现计时器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文