I\'m trying to do something pretty simple. I want to place an icon in a column for a particular row in a table. If it\'s a folder, display a folder icon. If it\'s a file, di
In case the provided answers did not work for you (like it didn't for me), this was the solution I found (Of course you still needs to create the tableView and add the columns to it):
//Create your column that will hold the image
private final TreeTableColumn columnImage= new TreeTableColumn("Image");
public void start() {
//Set your cellValueFactory to a SimpleObjectProperty
//Provided that your class has a method "getImage()" this will work beautifully!
columnImage.setCellValueFactory(c-> new SimpleObjectProperty(new ImageView(c.getValue().getValue().getImage())));
}