[vtkusers] Java remove vtkImageViewer2 not working

Jonathan Morra jonmorra at gmail.com
Thu Dec 2 22:29:48 EST 2010


I have a java swing JPanel that contains another JPanel that contains a
vtkRenderWindowPanel which is hooked up to a vtkImageViewer2. In the course
of my program I want to remove the inner JPanel from the outer JPanel with
JPanel.remove(). I then want to add the inner JPanel to a different outer
JPanel. However when I do this VTK throws the following exception

ERROR: In ..\..\src\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 247
vtkWin32OpenGLRenderWindow (00000004C8E4830): wglMakeCurrent failed in
MakeCurrent(), error: The handle is invalid.

This seems like a very simple swing operation that I'm trying to do, but
it's failing. Does anyone know what I'm doing wrong?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101202/44535541/attachment.htm>


More information about the vtkusers mailing list