943,907 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 8191
  • Java RSS
Feb 21st, 2009
-1

Java Code for getting Clock to show time

Expand Post »
Hi,
I want to show running time in java
Please write java code for me.

thanks in advance.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Narayan15 is offline Offline
20 posts
since Nov 2008
Feb 21st, 2009
0

Re: Java Code for getting Clock to show time

Quote ...
Please write java code for me.
????

Are you sure you have gone through the rules even once ???


Here some of them quoted specially for you :

Quote ...
Also, to keep DaniWeb a student-friendly place to learn, don't expect quick solutions to your homework. We'll help you get started and exchange algorithm ideas, but only if you show that you're willing to put in effort as well.
And a link to the announcement.
Last edited by stephen84s; Feb 21st, 2009 at 3:42 am.
Featured Poster
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
stephen84s is offline Offline
1,316 posts
since Jul 2007
Feb 21st, 2009
0

Re: Java Code for getting Clock to show time

First of all in java is very simple.
Classes to use: Date, SimpleDateFormat, Thread.

And no we will not write the code. As instructed to other forum you posted (http://www.daniweb.com/forums/thread176644.html), first try it yourself and we will see what we can do.

Also if you want this done on a web page, try a different forum
Sponsor
Featured Poster
Reputation Points: 1014
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,259 posts
since Dec 2007
Feb 21st, 2009
0

Re: Java Code for getting Clock to show time

Click to Expand / Collapse  Quote originally posted by Narayan15 ...
Hi,
I want to show running time in java
Please write java code for me.

thanks in advance.
'java code'

see? I just wrote it for you.
this is the kind of application you should be able to write within about ten minutes.

run a thread, let it constantly refresh a JLabel (if you're writing a Swing app) to tell the exact current time of the system clock

you could even do it using less classes than given to you by javaAddict, but I'd take his way, if you want it to be decent.
Reputation Points: 935
Solved Threads: 356
Nearly a Posting Maven
stultuske is offline Offline
2,497 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Auto starting applications
Next Thread in Java Forum Timeline: Copying text from Command Prompt





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC