FeedViewer is a good example, but the example code is monolithic in structure. At some point, we will want to derive our own panels that are responsible for creating their own DOM and such. There are a few examples of this here and there, and I don't yet have a feel for the preferred manner in which I should extend ContentPanel.

Can someone provide an example of subclassing ContentPanel and dynamically adding a button with an onclick handler? Assume there is no accompanying HTML.