-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
7u6
-
Ubuntu 11.10, KDE version 4.7.4
Steps for reproduce:
1. add onCloseRequest handler with consuming incoming event
2. launch application
3. press close button ("x" icon)
Experted result: nothing happen (window is showing)
Actual result: window is closed, but application is still in running processes.
Code snippet:
...
@Override
public void start(final Stage stage) throws Exception {
...
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override
public void handle(WindowEvent event) {
System.out.println("close request: exit consumed");
event.consume();
}
});
stage.show();
}
1. add onCloseRequest handler with consuming incoming event
2. launch application
3. press close button ("x" icon)
Experted result: nothing happen (window is showing)
Actual result: window is closed, but application is still in running processes.
Code snippet:
...
@Override
public void start(final Stage stage) throws Exception {
...
stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
@Override
public void handle(WindowEvent event) {
System.out.println("close request: exit consumed");
event.consume();
}
});
stage.show();
}