Add a label (caption) to a component container

I need to develop a component using plain java from a container, but I need to have a label (caption). How can I add a label (caption) to a component container?

HLicea