我有一个主类,内容如下:
public class Window extends Application {
@Override
public void start(Stage foablak) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("Foablak.fxml"));
Scene scene = new Scene(root);
foablak.setScene(scene);
foablak.setWidth(900);
foablak.setHeight(700);
foablak.setResizable(false);
foablak.setTitle("Window");
foablak.show();
}
public static void main(String[] args) {
launch(args);
}
}
如何在不关闭窗口并打开新窗口的情况下,从另一个.java类中更新标题?