I'm creating an application that will act as a Stopwatch. It will have a card layout with three cards. The first will be a clock, the second will be a stopwatch, and the third will be a timer that counts backwards until reaching 0. Can someone please give me a little advise with regards to the threads? At first I was thinking about creating a different thread for each of the cards (3 timers). Now I'm thinking about creating one swing timer in a swingworker object, and using the invokeLater method to update all three cards. Does that sound like a good idea, or am I way off?
seems like the easiest thing to do would be to just use a single thread of your own creation(not the one created by the window). You could set your run method to execute every second(or maybe half second to be sure you get time changes closer to the actual time tic). Inside the run method call the update for each of your time displays(time,count up,count down). Each time display would need to check itself for invalid values (like less than zero for the count down). Something along those lines is how I would do it. Hope this helps.
Joined: Feb 18, 2003
okay, thanks Chris
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com