小编Ami*_*ngh的帖子

javafx image从imageview删除

我有一个包含许多ImageView节点的网格窗格。单击ImageView时,我想删除图像。

 ImageView image = new ImageView("https://www.google.co.in/images/nav_logo242.png");
Run Code Online (Sandbox Code Playgroud)

在一个动作上,我做到了:

 image.setImage(null);
 System.gc();
Run Code Online (Sandbox Code Playgroud)

但是,我仍然看到较旧的图像。

 image.getImage(); // it returns null
Run Code Online (Sandbox Code Playgroud)

javafx imageview

2
推荐指数
1
解决办法
8978
查看次数

标签 统计

imageview ×1

javafx ×1