}
catch (ItemNotFoundException e) {
Component[] components = findComponents(ComponentMatcher.ALL, swingClasses);
List<String> names = new ArrayList<String>();
for (Component component : components) {
UIComponent uiComponent = UIComponentFactory.createUIComponent(component);
String componentLabel = uiComponent.getLabel();
String componentName = uiComponent.getName();
if (componentLabel != null) {
names.add(componentLabel);
}
else if (componentName != null) {
names.add(componentName);