User Name
Remember Me?
Password
Register
FAQ
Social Groups
Calendar
Search
Today's Posts
Mark Forums Read
Java Forums
»
Java Education / Career
»
Java Tips
»
java.util
»
How to cancel an individual timer in spite of canceling whole timer
LinkBack
Thread Tools
Display Modes
#
1
(
permalink
)
04-04-2008, 03:46 PM
Java Tip
Moderator
Join Date: Nov 2007
Posts: 1,691
Rep Power:
5
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();
Bookmarks
Digg
del.icio.us
StumbleUpon
Google
«
How to use Calendar class
|
How to store property file into key value pair
»
Thread Tools
Show Printable Version
Email this Page
Display Modes
Linear Mode
Switch to Hybrid Mode
Switch to Threaded Mode
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
Forum Rules
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
.
Java Tips
|
Linux Archive
Contact Us
-
Java Forums
-
Sitemap
-
Top
VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org
LinkBack
LinkBack URL
About LinkBacks
Bookmark & Share
Bookmark in Technorati