Results 1 to 3 of 3
  1. #1
    cjburkey01 is offline Member
    Join Date
    Dec 2013
    Posts
    73
    Rep Power
    0

    Angry Run Task and Update Progress while Waiting for task.get();

    I think the title pretty much sums up my predicament. I have a task running and after it's done I return the value like this:
    Java FX Code:
    return task.get();
    Unfortunately, the thread us frozen during the wait, meaning the progressProperty has no point. Is there a way around this?

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,225
    Rep Power
    13

    Default Re: Run Task and Update Progress while Waiting for task.get();

    I don't know much about JavaFX but I know enough about programming that you didn't provide sufficient information to obtain help. Please
    submit a Short, Self Contained, Correct Example that illustrates the problem.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    398
    Rep Power
    5

    Default Re: Run Task and Update Progress while Waiting for task.get();

    Jim is right that the question is a little erratic, but just to give it a shot:

    You can bind the progress property of a progress bar to the progress property of the task and visualize the progress. You can find more info here.
    Last edited by benji2505; 05-20-2016 at 03:59 PM.

Similar Threads

  1. Replies: 0
    Last Post: 12-14-2014, 05:27 AM
  2. ant run-task
    By JSE.DUB in forum Lucene
    Replies: 0
    Last Post: 08-21-2013, 12:01 PM
  3. Replies: 0
    Last Post: 03-01-2012, 12:21 PM
  4. task
    By boys21 in forum Advanced Java
    Replies: 6
    Last Post: 05-28-2010, 01:59 PM
  5. Help with a task.
    By checho in forum New To Java
    Replies: 5
    Last Post: 01-14-2010, 11:29 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •