# io.github.libtmux.Window.Window.applyLayout

- **Module:** io.github.libtmux.Window.Window
- **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/Window.java#L239
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-window-window-applylayout/

```
io.github.libtmux.Window.Window.applyLayout(layout: String) -> void
```

Restores an exact arrangement previously read from {@link #layout()}.

<p>The string is checked here rather than by tmux, because tmux 3.3a does not survive being
handed one it cannot parse: it ends the server and every session on the socket. Every other
supported release answers {@code invalid layout}. Since a layout string carries tmux's own
checksum, a wrong one is detectable without asking.

## Raises

- `IllegalArgumentException` — if the string is not a layout tmux wrote
