Skip to content
Advertisement

Display output of two different Threads in two separate JavaFx TextArea’s

Hello guys so i have to make two threads that sell train tickets simultaneously and display there output on two different windows, i have create a class that generates the tickets and a Runnable but i am not sure how to display the output of the two different threads in the two different Text area boxes i have tried to pass the TextBox parameter but it didn’t work any ideas please ?

SellTicketThreadProc:

JavaScript

CTicketBiz:

JavaScript

Controller:

JavaScript

Advertisement

Answer

Here is a quick runnable application to demonstrate how to update 2 separate textareas from background threads like you have make sure to read through the comments that explain whats going on. Obviously this is not the same exact thing as your program but I kept the core concept.

JavaScript

If you have any questions let me know

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement