How to update the label box every 2 seconds in java fx?

前端 未结 3 631
故里飘歌
故里飘歌 2020-11-27 19:58

I\'m trying to simulate a basic thermostat in an application GUI.

I want to update a label box value every 2 secs with the new temperature value.

For example

3条回答
  •  伪装坚强ぢ
    2020-11-27 20:22

    Calling Platform.runLater worked for me:

    Platform.runLater(new Runnable() {
    
        @Override
        public void run() {
    
        }
    });
    

提交回复
热议问题