[vtkusers] Help !! Error Locking Surface

Henry Zhang henry.zhang at ualberta.ca
Wed Jan 8 02:09:42 EST 2003


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();
	  }




More information about the vtkusers mailing list