I\'m having problem to close my javaFX application, when I click the close button from my stage, my application disappears but if I look for it in my task manager my applica
You could close your application by clicking close Button , with some code.
stage.setOnCloseRequest(
event -> closeMyApp()
);
private void closeMyApp()
{
try
{
Stage stage = (Stage) closeButton.getScene().getWindow();
stage.close();
}
catch(Exception ee)
{
ex.printStackTrace();
}
}
// where closeButton is button having similar controller class initialization.
@FXML
private Button closeButton;