<P>Hi, all: </P>
<P> I posted the mail once but did not receive any response. So I have to post it again and hope someone can give me a help. Sorry to bother you all. <BR> I met a problem about VTK rendering window and multithread. In my JAVA-VTK program, I have two button, A and B. In the method associated with A, there is an infinite loop, in which the actors are rendered from the first frame to last frame repeatedly in a rendering window. I set a globale variable "boolean jump=false". The infinite loop should exit by judging the value of "jump". In the method associated with button B, I set the variable as true.<BR> When I click A, the program will enter the infinite loop. I intend to exit the loop whenever I click the button B. But here is a problem. Once the program enters the dead loop, the GUI seems to be stucked and cann't respond to any user action. So the method of B can not set any global variable. <BR> From the view of thread, it is easy to understand--because the two buttons are both in the GUI thread, the dead loop will surely block the GUI thread so that button B is disabled. I tried to solve the problem by multithread. Although the loop can exit as I imaged, there still are some problems. If I put the dead loop in a thread, the rendering window can not be refreshed. IF I put the method of B into a thread, button B will also be disable once the program goes into the dead loop. I don't know whether it is a common problem for all kinds of window refreshing. I had studied multithread used in VTK for some time. As far as I know, VTK window will cause some problems in multithread because VTK calls opengl which is not safe for thread. But I am not sure whether the refreshing problem described above is caused by VTK or other reasons. Is it a common problem for all kinds window refreshing? Is there a way to solve this problem? Thank you very much. </P>
<P><BR>BEST WISHES </P>
<P>Lian <BR></P><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="$rd_url/welcome/?http://greetings.yahoo.com">Yahoo! Greetings</a> - send greetings for <a href="$rd_url/welcome/?http://greetings.yahoo.com/browse/Holidays/Easter/">Easter</a>, <a href="$rd_url/welcome/?http://greetings.yahoo.com/browse/Holidays/Passover/"> Passover