Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Generate the digits 0 through 9 (1 digit per task) 100 times each and you will have them displayed in your TextArea, rather than in

Generate the digits 0 through 9 (1 digit per task) 100 timeseach and you will have them displayed in your TextArea, rather than in the console. A single button will trigger the threads all at once.

2) Use a cached Thread pool to run these 10 tasks.

3) A single press of the button should trigger all 10 tasks. You will be creating an event handler that contains Thread pool code and the execution of your 10 tasks.

4) Set the text wrap feature to "true" for your TextArea so that it prints in a block instead of one long row.

5) Use some kind of code, such as Thread.sleep() so thatwhen the digits get added to the TextArea, they are fairly randomized-looking and not just a bunch of 1s and 2s and then a bunch of 3s and 4s.

6) I would like to see the digits added in real time. As the tasks are processed, we should see one or a few digits at a time added to the TextArea. I do not want you to press the button, and then have to wait and stare at a blank box for 15 seconds before we see all digits appear at once. You might get this in an earlier stage of the program, but you will probably need to utilize Platform.runLater() to fix this.


Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Statistics

Authors: Mario F. Triola

12th Edition

0321836960, 978-0321836960

More Books

Students also viewed these Programming questions

Question

How are sustainable consumption and voluntary simplicity related?

Answered: 1 week ago

Question

Name three healthy eating habits and three healthy exercise habits.

Answered: 1 week ago