1
Hello folks my doubt is have a child Anchorpane that is added inside the parent Anchorpane in my son Anchorpane I have a button called close.
How do I close Anchorpane Son without closing Anchorpane Father?
my code is like this:
@FXML
private Button btnFacharAnchorPane;
@FXML
public void fachar() {
btnFecharAnchorPane.getScene().getWindow().hide();
}
when I click the button it closes the whole program, what I want is that it closes only the internal Anchorpane that is the son
what’s going on there, is that both
AnchorPane
, belong to the sameStage
; at the time of makingbtnFecharAnchorPane.getScene().getWindow().hide();
You’re calling the sameStage
– Julio Cesar
then how do I close the inner anchorpane son without closing the parent anchorpane you know
– Natsuki Subaru