views:

85

answers:

1

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!

A: 

Ack - I've solved it! I called the start() method of the class rather than run() and its sorted. Seems so obviously when looking now!

David Meadows