stop org.jdesktop.application.Task started using @Action public Task

Discussion in 'Java' started by Mike, May 12, 2008.

  1. Mike

    Mike Guest

    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
     
    Mike, May 12, 2008
    #1
    1. Advertising

  2. Mike

    GArlington Guest

    Re: stop org.jdesktop.application.Task started using @Action publicTask

    On May 12, 12:01 am, Mike <> 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;"...
     
    GArlington, May 12, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman
    Replies:
    1
    Views:
    1,374
    smith
    Dec 8, 2004
  2. SpamProof
    Replies:
    0
    Views:
    582
    SpamProof
    Oct 21, 2003
  3. vlenin66
    Replies:
    10
    Views:
    10,112
  4. PerlFAQ Server
    Replies:
    0
    Views:
    690
    PerlFAQ Server
    Feb 3, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    697
    PerlFAQ Server
    Apr 4, 2011
Loading...

Share This Page