Solved

Timers

Posted on 2002-06-03
5
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 9

Accepted Solution

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

Expert Comment

by:objects
ID: 7050615
Copy the relevent source from 1.3 :)
0
 
LVL 11

Author Comment

by:mouatts
ID: 7050751
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
ID: 7052437
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
ID: 7053234
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

691 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