Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-04-2008, 03:46 PM
Java Tip's Avatar
Moderator
 
Join Date: Nov 2007
Posts: 1,691
Rep Power: 5
Java Tip will become famous soon enoughJava Tip will become famous soon enough
Default How to cancel an individual timer in spite of canceling whole timer
To achieve this goal you have to develop a subclass of timer class that can hold a list of all scheduled Timertask instances. Then you can retrieve instance you want to cancel

Code:
TimerTask [] tasks =timer.getScheduledTasks();
Tasks[0].cancel();
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CountDown timer Seema Sharma AWT / Swing 1 03-06-2008 05:26 PM
Simple timer im-not-alive New To Java 1 01-20-2008 10:04 PM
Page Timer deeadeed New To Java 0 12-05-2007 09:44 PM
Help with timer in java barney Advanced Java 1 08-01-2007 11:24 AM
problem with timer Marcus Advanced Java 2 07-01-2007 06:13 AM


All times are GMT +2. The time now is 09:28 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org