Hi Manfred,
Thanks for replying,
but, it still does the same thing.
Heres the actual code structure now
for(......)
{ try
{ Thread.sleep(1000);
}catch(.....)
t.calculateNext();
}
in class of object t
public void calculateNext()
{ //some zanny calculations
.
.
.
//and the last line before the return
repaint();
}
Now according to me the added function call shouldn't make a difference, but it does somewhere, and like all programmers I'm learning patience.
another clarification. I thought, and this is what the Complete Reference led me to believe, that the thread in which sleep() is called goes to sleep, and not the currently running thread. Is this wrong, or is it a half truth??
Also would it make a difference if I acquired the main thread and explicitly put it to sleep.
Thread mainThread=currentThread();
for(...)
{ try
{ mainThread.sleep(1000)
}catch(){}
calculateNext();
//which calls repaint() as the last statement
}
thanks again Manfred,
viren
ps. Nope I just tried that last bit, and it did the same thing.
[This message has been edited by viren vaz (edited August 10, 2001).]