JavaFX Threading issue - GUI freezing while method call ran.
Posted
by David Meadows
on Stack Overflow
See other posts from Stack Overflow
or by David Meadows
Published on 2010-03-16T14:35:52Z
Indexed on
2010/03/16
14:46 UTC
Read the original article
Hit count: 312
Hi everyone,
I hoped someone might be able to help as I'm a little stumped. I have a javafx class which runs a user interface, which includes a button to read some text out loud. When you press it, it invokes a Java object which uses the FreeTTS java speech synth to read out loud a String, which all works fine.
The problem is, when the speech is being read out, the program stops completely until its completed. I'm not an expert on threaded applications, but I understand that usually if I extend the Thread class, and provided my implementation of the speech synth code inside an overridden run method, when I call start on the class it "should" create a new Thread, and run this code there, allowing the main thread which has the JavaFX GUI on to continue as normal.
Any idea why this isn't the case? Thanks a lot in advance!
© Stack Overflow or respective owner