I am assuming, by Java, you meant JavaScript - which would be a much easier alternative.
I copied this code from
http://www.hashemian.comCODE
<script language="JavaScript">
TargetDate = "12/31/2020 5:00 AM";
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "It is finally here!";
</script>
<script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script>
As you said, you've been blasted with heaps of code without explanations - so I'll explain this for you.
1 TargetDate - This is the date (and time) that you are counting down too!
2 BackColor - This is for the graphical side of it, change this to match your website
3 ForeColor - Whatever colour you want your text, this is it!
4 CountActive - Whether the timer is counting down or not
5 CountStepper - How much to count down each time (make time faster by increasing this value

) best to leave this one!
6 LeadingZero - Display zero in front of values (e.g. 04 days left)
7 DisplayFormat - How the values will be displayed, change to whatever suits you!
8 FinishMessage - This is what is displayed when the countdown is finished!
the very last line
CODE
<script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script>
tells the browser where to look for the javascript file. If you want, you can download this file and host it locally (with your website) and change the address as necessary.
Good Luck
-jimmy
P.S If you want to, search on google for javascript countdown timers, theres heaps of websites and most of them should have explanations.
Reply