0
I want to know how to make my Anchorpane internal responsive example: i have a main screen and on this main screen has a configuration button.
When I click this button, opens another Anchorpane inside the main Anchorpane. The problem is that when the internal Anchorpane is opened, it does not get the size of the parent Anchorpane, that is, if I resize the Main Anchorpane, the Anchorpane inside it does not resize together, it gets the standard size that is in my Scenebuilder.
How can I make my internal Anchorpane resize together with the main Anchorpane?
This is the code of the button that adds the internal Anchorpane
@FXML
private AnchorPane adicionarTela;
@FXML
public void abrirTelaConficuracao() throws IOException, Exception {
AnchorPane a = (AnchorPane) FXMLLoader.load(getClass().getResource("TelaConfiguracao.fxml"));
adicionarTela.getChildren().add(a);
}
FXML anchors I had already set but now the part of the code you wrote setTopAnchor and the others I did not know I did and worked the way I wanted to thank you so much, now I have another question how I can close the internal Anchorpane without terminating my application
– Yato