JavaFX for-loop considerations