repainting all children of a panel/frame at once
843807Mar 12 2010 — edited Mar 15 2010I'm not too familiar with GUI development, I recently 'inherited' a GUI from my colleague when he changed project. I've discovered that he is calling the repaint method of a jframe but it is not repainting the labels which are attached to the Jframe. I've tried multiple variants of repaint and evaluate on the frame and panels within the frame, but the labels added to the frame/panels still arn't repainting. I can call a repaint on the individual labels and they work correctly, but there are way too many components to be calling repaint on every one individually (I suppose I could use a for loop to cycle through them all and repaint them, but there must be a better/more elegant solution).
I've tried googling this and I'm surprised that no clear answer was revealed. We are using a combination of Swing and AWT. It looks like the special component, including the labels I'm trying to repaint, extend the AWT canvas class; while the labels and panels are swing. I don't know if that has any effect. So can anyone tell me how to re-paint all my labels?