Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2003

Tip: Looking for answers? Try searching our database.

Timers

Thread view: 
Advocated - 07 Dec 2003 16:53 GMT
Having a few problems restarting a timer.
Currently using 2 timers, both begin like:
javax.swing.Timer t = new javax.swing.Timer(30000, new ActionListener() {

and

javax.swing.Timer moving = new javax.swing.Timer(10000, new ActionListener()
{

These both work fine on their own, but now when it comes to starting the
timer again, it doesnt know which one to start

Before when i was only using one timer, i was doing:  new Timer()  but now
it wont know what to start, ive tried  new Timer(t) but i get the error
message:

cannot resolve symbol
symbol  : constructor Timer  (javax.swing.Timer)
location: class java.util.Timer
           new Timer(t);

import java.util.Timer.*; is already imported..

Any ideas? i need to be able to make those new timers run again, like make a
new instance of it, not just .start again

Cheers
Advocated - 07 Dec 2003 17:39 GMT
> Having a few problems restarting a timer.
> Currently using 2 timers, both begin like:
[quoted text clipped - 23 lines]
>
> Cheers

Helps if i do, t.restart() :p


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.