I am working with javafx tableview.
One of my column is currently having all row as null but I still want it to display it by having null written in those columns.
Any suggestion ?
You can use setCellFactory() and on the updateItem() methode, you check if item is null and if it's true you write "null"
@Override
public void updateItem(T item, boolean empty) {
super.updateItem(item, empty);
if (item == null || empty) {
setText("null");
setGraphic(null);
} else {
//Things to do if it's not null
}
}
check that for detail http://www.java2s.com/Code/Java/JavaFX/customcellfactory.htm but for display null just do what I say