I don't understand something. If I'm in the "for loop" for this case. The following code do exactly that I want, but it's not material design: Alert alert = new Alert(AlertType.CONFIRMATION); ...