Seconds do not decrease, the program immediately after pressing the button gives those numbers "1:03", and nothing else. I tried to remove the break, gives "0: 0."
public void TIMER_funk(int sec) { timer_sec.schedule(new TimerTask() { @Override public void run() { Platform.runLater(new Runnable() { @Override public void run() { int seconds = sec; while (--seconds > 0) { MINUTES.setText(String.valueOf(seconds / 60)); SECONDS.setText(String.valueOf(seconds % 60)); break; } if(seconds % 60==1||seconds % 60==2||seconds % 60==3||seconds % 60==0){ SECONDS.setTextFill(Color.RED);}else{SECONDS.setTextFill(Color.BLACK);} if(seconds % 60==1||seconds % 60==2||seconds % 60==3||seconds % 60==4||seconds % 60==5||seconds % 60==6|| seconds % 60==7||seconds % 60==8||seconds % 60==9){ SECONDS.setText("0"+String.valueOf(seconds % 60)); } } }); } }, 1000, 1000); } 
