java - JavaFX close action controller -
i did try find answer on problem dont understand have do. want close window when cancel button pressed. in scenebuilder have cancelbtnaction declared , cancelbtn fx:id. have controller class
@fxml private button cancelbtn; @fxml public void cancelbtnaction() throws ioexception { parent root = fxmlloader.load(getclass().getresource("loginfxml.fxml")); stage stage = (stage)cancelbtn.getscene().getwindow(); stage.close(); } go easy on me 1st post, peace :)
Comments
Post a Comment