我使用了你的代码但是使用了更新版本的Netbeans . 我还添加了一个String列 .
import javafx.scene.image.ImageView;
public class CustomImage
{
private ImageView image;
private String string;
CustomImage(ImageView img, String string)
{
this.image = img;
this.string = string;
}
public void setImage(ImageView value)
{
image = value;
}
public ImageView getImage()
{
return image;
}
public void setSring(String string)
{
this.string = string;
}
public String getString()
{
return this.string;
}
}
在JavaFx Controller中实现 .
import java.net.URL;
import java.util.ResourceBundle;
import javafx.collections.FXCollections;
import javafx.collections.Observa