![]() |
stop org.jdesktop.application.Task started using @Action public Task
Hello
I am using org.jdesktop.application.Task from NetBeans 6 in my app. I start Task with jButton using @Action: @Action public Task startClusteringTask() { ... return myTask; } Is there any way to stop this task when it is running? Thank you in advance Mike |
Re: stop org.jdesktop.application.Task started using @Action publicTask
On May 12, 12:01 am, Mike <darthvadertojabuahahah...@gmail.com> wrote:
> Hello > I am using org.jdesktop.application.Task from NetBeans 6 in my app. > I start Task with jButton using @Action: > @Action public Task startClusteringTask() > { > ... > return myTask; > > } > > Is there any way to stop this task when it is running? > Thank you in advance > Mike Depending on your implementation of startClusteringTask() your task will either stop when the method is finished, or [if you create a separate thread for your "myTask"] it will continue running until you quit the application unless you set a ref to the task somewhere in your object. You can use HashMap (or similar) and add a ref to your task as myHashMap.add(myTask.name, myTask) just before "return myTask;"... |
| All times are GMT. The time now is 01:38 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.