K
K
kb_s_fs2019-04-18 21:07:44
Java
kb_s_fs, 2019-04-18 21:07:44

How to correctly redirect the output of the streams to a TextArea?

I have two running threads (they must work a certain number of times), which periodically print some information, for example - System.out.println("I am Thread-0"). If I immediately display it in a TextArea, then when I enter a number greater than 8 (this is how many times they have to work), the program ends with errors. So what's the best way to send information to a TextArea?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Alexandrov, 2019-04-22
@jamakasi666

Synchronize threads with javafx thread.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question