How to resize automatically when loading an FXML into an AnchorPane?
问题 I am having trouble with the layout of an FXML I load into an AnchorPane. I have a Scene.fxml with an AnchorPane and a button on it. Pressing the button loads the Internal.fxml into the AnchorPane. The Internal.fxml has a TextField with the AnchorPane Constraints set to left and right. That's about it. Though now when resizing the window the TextField does not resize. Why doesn't the TextField resize itself? Where is the error in the code below? Main.java: @Override public final void start