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:

  1. user clicks 'start'
  2. counter starts...
  3. user clicks 'pause'
  4. 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

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -