How do you refresh JavaFX scene from inside an button action?
问题 I'm making a sorting algorithm visualizer and i want the UI to update in real time to show how it works, step by step. But the UI only updates when the sort() method is done, I want it to update when updateHeight() is done the sort() method is initiated by an onAction @FXML public void sort() throws InterruptedException { minHeight = RectHeight[0]; counter = 0; minIndex = 0; temp = 0; for(int i=1;i<RectList.size();i++){ System.out.println(RectList.size()); System.out.println(counter); sort2()