The initialize function is used to start any code you want when switching to the connected Controller's scene. It also has access to all of your FXML elements, so if you need to add Java functionality to an element, you could do it here. For example, we use our initialize function to call a method that loads all of the cards onto the screen to display them within JavaFX elements. This way, that method will always activate no matter how you switch to that scene, whether it be from a button or a file menu.