timer - Adding a time counter in Java? -
i writing application in java , add counter in user can start , stop. count in second , go minutes , hours (not days or months). make this?
here how function:
- user clicks 'start'
- counter starts...
- user clicks 'pause'
- counter stops doesn't reset
i new java there code @ or similar this? if not write me little code me started this?
thanks, ljbaumer
some recommendations:
- i use swing gui library
- i use swing timer nucleus of gui timer.
- a jlabel display change in time swing timer.
- the start jbutton's actionlistener start swing timer (calling
start()
on it) - the pause jbutton's actionlistener call
stop()
.
regarding:
i new java there code @ or similar this? if not write me little code me started this?
no, that's not how works here. responsible writing own code, we'll glad along if stuck or run errors or exceptions. learn more forcing brain create code, if seems difficult do.
please check out following tutorials:
Comments
Post a Comment