scene.lookup() returns null if i search my VBox
问题 Basically, i need to retrieve a VBox from an fxml file and i'm using scene.lookup. But if i search for it, it just crashes with a NullPointerException. So i tried to print what scene.lookup() finds, and it just finds null (duh), but i can't understand why. This is my Main class: public class Main extends Application { @Override public void start(Stage stage) throws Exception{ FXMLLoader loader = new FXMLLoader(getClass().getResource("MainWindow.fxml")); Parent root = loader.load(); Scene