Re: How Do I Make my Own Java Debt Real-Time Clock?
by Roedy Green <see_website@[EMAIL PROTECTED]
>
May 7, 2008 at 09:03 AM
On Tue, 6 May 2008 23:53:52 -0700 (PDT), Norak <k.norak@[EMAIL PROTECTED]
>
wrote, quoted or indirectly quoted someone who said :
>http://www.babylontoday.com/national_debt_clock.htm
>
>It has a java applet that shows in real time the US national debt. I
>would like to construct something similar for the Australian economy.
>This means I will have to change some numbers around to make it fit
>the Australian case.
>
>How can I do this? Is there a website where I can create my own real-
>time clock and then embed it to my website?
Have a look at the code for SetClock. It has a background thread that
updates the time. You would use similar logic to recompute the debt
each second and repaint. I might also have used a SwingTimer or a
Timer which periodically executes a Runnable.run method.
see http://mindprod.com/products1.html#SETCLOCK
See http://mindprod.com/jgloss/timer.html
See http://mindprod.com/jgloss/calendar.html
for how to get get hold of the time in seconds from some epoch which
you will need for your formula.
If that is beyond your current ability, I will write you one for $50
AUD.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com