<P>Hi, all: <BR> I met a problem about VTK rendering window and multithread. </P>
<P> 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 </P>
<P>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 </P>
<P>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 </P>
<P>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 <BR>thread so that button B is disabled. <BR> I tried to solve the problem by multithread. Although the loop can exit as I imaged, there still are some problems.</P>
<P> 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, the program runs still in <BR>the way descibed as above. </P>
<P> 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 </P>
<P>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 </P>
<P>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? </P>
<P> 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/tag/http://movies.yahoo.com/">Yahoo! Movies</a> - coverage of the 74th Academy Awards®