Close browser window from button

Hi all,

I have to create a Vaadin application with several native windows. It is no problem to close the native windows by clicking the “x” of the browser window.

But is it possible to close a native window within a ClickEvent of a button component? I already tried calling removeWindow(nativeWindow) on the application component. Also calling close() on the native window doesn’t run. The browser window still stays open.

Is there actually a way to close a native window through a button?

Thanks for helping.