问题描述:按钮启动新线程对UI的控制时出现以下问题
java.lang.IllegalStateException: Not on FX application thread
针对这个问题解决方法如下:
Platform.runLater(new Runnable() {
@Override
public void run() {
//if you change the UI, do it here !
}
});
这样就可以对UI进行操作了!