#!/usr/bin/perl
use strict;
use Gtk2 -init;
use Glib qw(TRUE FALSE);
# Create my objects
my $window = Gtk2::Window->new;
my $table = Gtk2::Table-> new(2,2,FALSE);
my $label = Gtk2::Label->new('Are you sure you want to quit?');
my $yes = Gtk2::Button-> new('Yes');
my $no = Gtk2::Button-> new('No');
# Set properties on Main Window
$window->add($table);
$window->set_default_size(300,100);
$window->set_title("Main");
# Set properties on table
$table-> attach_defaults($label,0,2,0,1);
$table-> attach_defaults($yes,0,1,1,2);
$table-> attach_defaults($no,1,2,1,2);
# Set signals
$window->signal_connect(delete_event=> sub { Gtk2->main_quit; });
$yes-> signal_connect(clicked=> sub { Gtk2->main_quit; });
$no-> signal_connect(clicked=> sub { });
# Show the GUI you created
$window->show_all;
Gtk2->main;