// create the window
$window = &new GtkWindow();
// create the container with 3 rows and 2 columns
$container = &new GtkTable(3,2);
// create a text entry widget and add it to the container
$text_entry = &new GtkEntry();
$container->attach($text_entry,0,2,0,1);
// create a button and add it to the container
$a_button = &new GtkButton('Abort');
$container->attach($a_button,0,1,1,2);
// create another button and add it to the container
$r_button = &new GtkButton('Retry');
$container->attach($r_button,1,2,1,2);
// create yet another button and add it to the container
$f_button = &new GtkButton('Fail');
$container->attach($f_button,0,2,2,3);
// add the container to the window
$window->add($container);
// display the window
$window->show_all();
// necessary so that the program exits properly
function shutdown() { gtk::main_quit(); }
$window->connect('destroy','shutdown');
// start GTK's signal handling loop
gtk::main();