I have a media player and i am putting a listiner on my media player for both the slider value and the time value my question is how do i format the time that i am putting in the label to display as 0:00 the first 0 being the minute the second being 10s of seconds and the third every one second.
public void setUpsongDurationSlider()
{
musicMedia.getMediaPlayer().currentTimeProperty().addListener((obs, oldTme, newTime)->
{
homeView.getSongDurationSlider().setValue(newTime.toSeconds());
homeView.getSongDurationSliderLabel().setText(Double.toString((newTime.toMinutes())));
});
}