Answer the question
In order to leave comments, you need to log in
How to close a window in javafx?
I don't know how to close the window. Tried typing this, but it doesn't work.
public void close() {
Stage stage = new Stage();
stage.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(final WindowEvent event) {
System.out.println(event);
if (shouldClose()) {
dialog.close();
}
}
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question