Sample code from graphical user interfaces lecture