Window creation: Difference between revisions

→‎{{header|Perl 6}}: Update to current standards
(→‎{{header|J}}: Update for J8 (works with J6 too))
(→‎{{header|Perl 6}}: Update to current standards)
Line 1,683:
Exit either by clicking the button or the close window control in the upper corner.
<lang perl6>use GTK::Simple;
use GTK::Simple::App;
 
my GTK::Simple::App $app .= new(title => 'Simple GTK Window');
 
$app.size_requestsize-request(250, 100);
 
$app.set_contentset-content(
GTK::Simple::VBox.new(
my $button = GTK::Simple::Button.new(label => 'Exit'),
Line 1,694 ⟶ 1,695:
);
 
$app.border_widthborder-width = 40;
 
$button.clicked.tap: { $app.exit }
10,333

edits