Sample ScratchPad project. See the chapter called "The Window System" in the book "Rich Client Programming: Plugging into the NetBeans Platform" for details.

This sample is illustrates a TopComponent, which simply contains a text area for text that can be pasted and copied.