Hi Seb,<div> Thanks for the reply. All the operations that I am doing are in a single thread. And I am using the javax.swing.SwingUtilities.invokeLater() syntax in the main function. </div><div> More about the error :: When the error occurred the image that is being displayed in vtkCanvas is becoming full white. But vtkImageData is not corrupted/null. </div>
<div><br></div><div>The Lines where the error is occurring </div><div> panel1.remove(vtkCanvasObject);</div><div> <i><b> panel2.add(vtkCanvasObject);</b></i></div><div><br></div><div>Thanks a lot.</div>
<div><br></div><div>Best Regards,</div><div>Satya.</div><div><div><br></div><br><div class="gmail_quote">On Tue, Jul 17, 2012 at 8:20 AM, Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Did you make sure you were performing those operation within the EDT ?<br>
If yes, then don't do what you are doing. Find another way...<br>
<div class="im"><br>
On Tue, Jul 17, 2012 at 12:16 AM, satyanarayana reddy<br>
<<a href="mailto:satyajanga@gmail.com">satyajanga@gmail.com</a>> wrote:<br>
</div><div><div class="h5">> Hi vtkusers,<br>
> I have a vtkCanvas object which renders vtkImageData and it is<br>
> working absolutely fine.<br>
> My application consists of a JFrame with JTabbedPane in it. A<br>
> Simple requirement in my application is that whenever a tab gets selected I<br>
> have to remove the vtkCanvas object from the previous active tab and add it<br>
> to the current active tab. When I am trying to do it I am getting the<br>
> following error.<br>
><br>
><br>
> wglMakeCurrent failed in MakeCurrent(), error: handle Invalid()<br>
><br>
> Please give me some pointers about where I am doing wrong.<br>
><br>
> Thanks a lot<br>
><br>
> Best Regards,<br>
> Satya.<br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
</blockquote></div><br></div>