1require "tk" 2 3TkButton.new(nil, 4 :text => 'hello', 5 :command => proc{print "hello\n"}).pack(:fill=>'x') 6TkButton.new(nil, 7 :text => 'quit', 8 :command => proc{exit}).pack(:fill=>'x') 9 10Tk.mainloop 11