I have a Model that gets data from a database.The Model has a variable length which is the duration of the Model in seconds, however I would like to show this length variable in my TableView as a string that displays minutes, for example: 70 -> "1:10"
I currently have the following, it works but it shows the length as Integers
...
public TableView<Model> table;
public TableColumn<Model, Integer> length;
...
public void initialize() {
...
length.setCellValueFactory(new PropertyValueFactory<>("length"));
table.setItems(database.getAllModels())
}
I rather don't change anything to the Model as i just get an observableArrayList that I just put in my table. How can I easily modify this?