I\'m creating my JavaFX application and I need to use time label every time new list cell is created. I need to put the string with current time in HH:MM format
HH:MM
It's probably better to use Java 8 types (java.time) in a new application. You can first create a DateTimeFormatter:
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:mm");
And then get the current time and format it:
Label timeLabel = new Label(LocalTime.now().format(dtf));