| | |
Countdown
![]() |
Is it possible to make a timer that counts down to a cerrtin day and time also is it possible to make it display some where but not in the way
PETA People for the Eating of Tasty Animals.
FireFox
Hijack This
Ad-Aware
Hijack this tutorial
Microsoft AntiSpyware
CompUchat
FireFox
Hijack This
Ad-Aware
Hijack this tutorial
Microsoft AntiSpyware
CompUchat
•
•
•
•
Originally Posted by OurNation
to make it display some where but not in the way
where do you want it to be displayed ??
if I were coding ... I would have put it in the startup and check for date and time ( Calendar class) everysecond or so ... and then set it visible on the specified time.
Hey OurNation,
Yes it is possible.
The straightforward way to find the difference in time is to simply use Date().getTime() for time in milliseconds. Just subtract the current date in millisecs from the future date in millisecs. It may also possible to use Calendar.add() to find the difference in time.
I have two suggestions for keeping the information out of the way of your workspace.
Approach #1)
You could make a program that updates the frame title with the message (i.e. 2 days left). This app doesn't have to have a visible frame, or the app could start minimized. This is probably the easiest out-of-the-way approach for a countdown timer.
Approach #2)
Use a trayicon to display the information. This requires some os shell programming, but luckily there are many people who have already written code to do this. (http://jeans.studentenweb.org/java/t.../trayicon.html)
Hope this helps!
Ed
Yes it is possible.
The straightforward way to find the difference in time is to simply use Date().getTime() for time in milliseconds. Just subtract the current date in millisecs from the future date in millisecs. It may also possible to use Calendar.add() to find the difference in time.
I have two suggestions for keeping the information out of the way of your workspace.
Approach #1)
You could make a program that updates the frame title with the message (i.e. 2 days left). This app doesn't have to have a visible frame, or the app could start minimized. This is probably the easiest out-of-the-way approach for a countdown timer.
Approach #2)
Use a trayicon to display the information. This requires some os shell programming, but luckily there are many people who have already written code to do this. (http://jeans.studentenweb.org/java/t.../trayicon.html)
Hope this helps!
Ed
•
•
•
•
In a world without walls or fences,
What use are Windows and Gates.
![]() |
Similar Threads
- Visual Basic Timer/Clock/Countdown. (Visual Basic 4 / 5 / 6)
- Pause/Restart Countdown Timer Question (VB.NET)
- Countdown Timer (VB.NET)
- timer countdown help (Visual Basic 4 / 5 / 6)
- Timer Countdown (C++)
- Countdown to a date (Visual Basic 4 / 5 / 6)
Other Threads in the Java Forum
- Previous Thread: doubly linked list implementation
- Next Thread: Can someone tell me what i am doing wrong?
| Thread Tools | Search this Thread |
911 actionlistener addball addressbook android applet application apps array automation binary bluetooth businessintelligence button card character class client code collision component consumer crashcourse css csv database desktop eclipse ee error fractal free ftp game givemetehcodez graphics gui html image integration j2me japplet java javaarraylist javac javadoc javaee javafx javaprojects jni jpanel julia jvm linked linux loan mac method migrate mobile netbeans objects online oriented phone physics printf problem program programming project projects radio recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server service set sms software sort sql swing test textfield textfields threads time tree trolltech ubuntu update utility windows






