Closing buttons after 3 seconds javafx

I have a grid with buttons. 1 to 3 buttons are activated randomly in my grid and I am trying to close buttons that are activated, after 3 seconds.
I tryed using a timeline but it only closed 1 button. Any idea ?