i have a code which takes values from xml file and repaint() is called for each new value
but after the control reaches line 1 to call repaint(); ,the control is not entering paint method
same thing is happening in line 2.
but at the end of loop when control reaches repaint(); at line 3 the paint method is called and correct output is got in the applet.
my question is why reapint(); is not working in line 1 and 2.
how to solve this.
Code running on the event thread (like event handlers) need to return quickly - calling Thread.sleep is a particularly bad idea. You should start a separate thread in which you perform all these actions.