如何使用我的控制器更改FXML文件中的标记中的网址。
图像嵌套在窗格> childeren> Imageview>图像中 看到图片
我想要的
我想循环浏览图像以检查坐标,并使用正确的坐标更改网址。
这是我的循环
for (int i=0; i < 54; i++) {
if (objectsPane.getchildren().get(i).getLayoutX() == village.getX() && objectsPane.getchildren().get(i).getLayoutY() == village.getY()) {
objectsPane.getchildren().get(i). // Setting the url
}
}
如何实现?