What this code does: it creates a ScrollPanel and adds a ScrollHandler to it. In the ScrollHandler the scrollheight gets compared to the height of the panel and it then adds another child to the panel.

I haven't tested it because I'm writing this on a netbook and don't have an IDE on it.