I am trying to refresh a clabel in a composite. However the clabel does not always exist. I need a way to check if exists in the composite. I have tried the getChildren class on the composite, and I have been able to use it to find all the CLabel‘s on the composite,but I can’t parse them.
This is what I have so far
Control[] childs = comp.getChildren();
for (int i = 0; i < childs.length; i++) {
if(childs[i].getClass().getSimpleName().equalsIgnoreCase("CLabel")){
}
}
Why not use
instanceofand then cast it?