I’ve wrote a simple Javafx application which starts a new thread and it works OK from Netbeans.
But I’m getting following warning during compilation:
explicit use of threads is not supported
Does it mean that it might now work in all possible devices like mobile phones or browser?
JavaFX itself must run on the main JavaFX thread, so starting a Thread directly from JavaFX is not currently supported. However, you can create a Java class that spawns a Thread. So, your JavaFX class calls the Java class that then starts a Thread.
Calling back to JavaFX from a Java thread, you need to be on the main JavaFX thread. An example of how to do this is:
You should not manipulate the JavaFX objects directly from Java. If you do it from Java, you need to use the javafx.reflect classes.