i have a program with 2 jPanels. one contains a button, the other is initially blank. When the button is pressed, one of the jPanels has objects added to it. However, they dont show unless i resize the whole window. is there a way to update the panel with the objects without resizing?
Alternatively, you can call the panel's repaint() method. I don't know the difference between calling repaint() over calling validate(). You should look at the Javadocs for JPanel to find out for yourself.
p.s. For future reference, we have a GUI forum where such questions are discussed on a regular basis. You should consider posting related questions there as the experts on this particular portion of the Java API are more likely to be hanging out there. [ March 02, 2005: Message edited by: Layne Lund ]
thankyou all for your help. i have got the problem solved a different way ( by accident). if i setText object eg "", the screen updates. Sorry for posting on the wrong forum. ill have to see what other forums are available. At the moment id only had this forum on my favorites (good helpful forum by the way ). Anyway, back another 2 hr slog to try and fix my loop problem.
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad: