Solved

Timers

Posted on 2002-06-03
5
229 Views
Last Modified: 2010-03-31
According to Suns documentation java.util.timer was added in 1.3, but it doesn't say when javax.swing.timer was added although as swing was added in 1.3 I'm assuming that it was also added then.

With all that in mind how do you implement a timer in 1.2

Steve
0
Comment
Question by:mouatts
  • 2
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
Venci75 earned 50 total points
Comment Utility
Creating a Thread object and using the sleep() method of this thread
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
Copy the relevent source from 1.3 :)
0
 
LVL 11

Author Comment

by:mouatts
Comment Utility
Objects: I'll leave bloatware to Microsoft :)

Venci75: Thanks. I suspected this might be the case just it seemed such a strange omission from 1.2 that we were forced to use a method from the dark ages, that I figured maybe I had missed something.

Steve
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
Could also argue that your reinventing the wheel :)
Depends on what functionality you require from your timers, if you need the same as what Sun provides then I don't see much difference between reimplementing it yourself and using already implemented and tested code.
:-)
0
 
LVL 11

Author Comment

by:mouatts
Comment Utility
Objects: The main difference if re-using the sun code is that the code will need to be downloaded as part of the jar whereas if its part of the JVM it doesn't, therefore download times will be worse.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now