Java Code for getting Clock to show time

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2008
Posts: 20
Reputation: Narayan15 is an unknown quantity at this point 
Solved Threads: 0
Narayan15 Narayan15 is offline Offline
Newbie Poster

Java Code for getting Clock to show time

 
0
  #1
Feb 21st, 2009
Hi,
I want to show running time in java
Please write java code for me.

thanks in advance.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: Java Code for getting Clock to show time

 
0
  #2
Feb 21st, 2009
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 :

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.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 1,708
Reputation: javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all 
Solved Threads: 229
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Posting Virtuoso

Re: Java Code for getting Clock to show time

 
0
  #3
Feb 21st, 2009
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
Check out my New Bike at my Public Profile at the "About Me" tab
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: Java Code for getting Clock to show time

 
0
  #4
Feb 21st, 2009
Originally Posted by Narayan15 View Post
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC