Vaadin 7 migration issue : what happened to Component().getWindow()

Hello,
We are porting from 6.8.12 to 7.1.10. I basically need to do something as follows:

Button button = new Button("Click Me!");
button.addListener(new Button.ClickListener() {
public void buttonClick(ClickEvent event) {
UI.getCurrent().removeWindow(event.getComponent().getWindow());
}
});

Unfortunately it seems that Component.getWindow() has disappeared. What would I need to do in Vaadin 7?

Thanks

Hi, please see >>
Migration guide

Window window = new Window() 
 Button button = new Button("Click Me!");
      button.addListener(new Button.ClickListener() {
          public void buttonClick(ClickEvent event) {
                       window.close();
         }
      });
UI.getCurrent().addWindow(window);