require 'gtk' window = Gtk::Window.new(Gtk::WINDOW_TOPLEVEL) table = Gtk::Table.new(2, 2, false) button1 = Gtk::Button.new('Hello World') button2 = Gtk::Button.new('button2') button3 = Gtk::Button.new('button3') table.attach button1, 0, 1, 0, 1 table.attach button2, 1, 2, 0, 1 table.attach button3, 0, 2, 1, 2 window.add table button1.show button2.show button3.show table.show window.show Gtk.main