> Markdown version of [Browser Window Resize Events](https://vaadin.com/docs/v14/flow/browser/tutorial-flow-window-resize). Section index: [llms.txt](https://vaadin.com/docs/v14/flow/llms.txt)

# Browser Window Resize Events

The `Page` class allows you to register a listener for events that affect the web page and the browser window in which the Vaadin UI resides. The `Page` instance corresponding to a given `UI` is accessed by the `getPage()` method of the `UI`.

**Example**: Accessing the browser window size and adding a size-change listener.

```java
Page page = UI.getCurrent().getPage();
page.addBrowserWindowResizeListener(
        event -> Notification.show("Window width="
                + event.getWidth()
                + ", height=" + event.getHeight()));
```

`1DC50FA7-65E7-4319-982C-BE5F6120E791`
