[vtkusers] Help !! Error Locking Surface

Jeff Lee jeff at cdnorthamerica.com
Wed Jan 8 07:11:34 EST 2003


Hi Henry,
I am assuming your container object is a JFrame? You need to call
setVisible(true) on your frame. See the examples in vtk4.x cvs or nightly.
-Jeff
Henry Zhang wrote:

> Hello, every one,
>
> I am learning Vtk with JDK 1.4.0, I always got the
> "Error Locking Surface" Message. Could any one
> please tell me how to fix this problem? thx!
> my code follows
>
> public reader(String title){
> super(title);
> init();
> enableEvents(AWTEvent.WINDOW_EVENT_MASK);
>
> vtkPanel renPanel = new vtkPanel();
>
> vtkSTLReader part=new vtkSTLReader();
> part.SetFileName("C:\\Program
> Files\\vtk40\\VTKData\\Data\\42400-IDGH.stl");
>
> vtkPolyDataMapper partMapper=new vtkPolyDataMapper();
> partMapper.SetInput(part.GetOutput());
> vtkLODActor partActor=new vtkLODActor();
> partActor.SetMapper(partMapper);
>
> vtkRenderer ren = renPanel.GetRenderer();
> ren.AddActor(partActor);
>
> ren.SetBackground(0.1, 0.2, 0.4);
>
> renPanel.setSize(400,400);
> removeAll();
> setLayout(new BorderLayout());
> add(renPanel,BorderLayout.CENTER);
> add(left(),BorderLayout.WEST);
>
> pack();
> }
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>




More information about the vtkusers mailing list