use one of the following methods:
1) use an string with an index for your component names (like label1 , label2, label3) and then use introspection.
2) put your components in an collection (for example an Array) then iterate over collection content and do what ever you want with them
3) use your parent component (form, dialog) getChildren to get collection of components, and then iterate over them