# io.github.libtmux.Session.Session.newWindow

- **Module:** io.github.libtmux.Session.Session
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/Session.java#L137
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-session-session-newwindow/

```
io.github.libtmux.Session.Session.newWindow(name: String) -> Window
```

Creates a window in this session and returns that exact window.

<p>The creating command reports which window it made, rather than the name being looked up
afterwards: two windows may share a name, and then a lookup cannot say which one is new.

## Parameters

- `name` (String) — the window name

## Returns

a handle on the created window, from a fresh capture
