> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/perl6-rosettacode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/perl6-rosettacode/programming_tasks/w/window_creation.md).

# Window creation

**Library** [GTK](https://github.com/perl6/gtk-simple)

Exit either by clicking the button or the close window control in the upper corner.

```perl
use GTK::Simple;
use GTK::Simple::App;

my GTK::Simple::App $app .= new(title => 'Simple GTK Window');

$app.size-request(250, 100);

$app.set-content(
    GTK::Simple::VBox.new(
        my $button = GTK::Simple::Button.new(label => 'Exit'),
    )
);

$app.border-width = 40;

$button.clicked.tap: { $app.exit }

$app.run;
```
