场景更改后如何更改文本?

时间:2018-07-14 12:34:30

标签: javafx textfield fxml scenebuilder scene

Parent tableViewParent = FXMLLoader.load(getClass().getResource("/FXML/win.fxml"));

Scene tableViewScene = new Scene(tableViewParent);
tableViewScene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());

window.setX(300);

window.setY(100);

window.setScene(tableViewScene);

window.show();

scoreWIN.setText("500");

嗨,在这里您可以看到场景变为win.fxml场景。在胜利中。 FXML场景中有一个名为scoreWIN的TextField。我希望当场景从先前的场景更改为win.fxml时,更改此TextField。帮助将不胜感激:D。

0 个答案:

没有答案
相关问题