Try this:
Window appointmentWindow = getApplication().getWindow(NATIVE_WINDOW_NAME);
if (appointmentWindow != null) {
getApplication().removeWindow(appointmentWindow);
}
Frage
How do I close the current browser tab? The following aren't working.
JavaScript.getCurrent().execute("window.close();");
or
UI.getCurrent().removeWindow(window);
or
window.close();
Lösung
Try this:
Window appointmentWindow = getApplication().getWindow(NATIVE_WINDOW_NAME);
if (appointmentWindow != null) {
getApplication().removeWindow(appointmentWindow);
}
Andere Tipps
Try this.
gBrowser.removeCurrentTab();