[vtkusers] New wiki Java examples

Jim Peterson jimcp at cox.net
Mon Nov 15 00:03:47 EST 2010


Seb,
Yes, the missing setVisible(true)  was it.  I see there is a 
vtkRenderWindowPanel that extends vtkCanvas. Are there any examples of 
how that would be used?  I had some success making my classes extend 
vtkCanvas and use the renderer renderwindow and interactor in the 
ancestor. I found I need to reset the camera to get a good initial view.

thanks for all your help,
Jim

Sebastien Jourdain wrote:
> Hi Jim,
>
> on which system are you running, did you forget the following line ?
>
> frame.setVisible(true);
>
> On linux and Mac you may get an error due to the fact that in the
> example all the swing code is not executed in the EDT. Which is bad...
> ;-)
> You can try to embed the code inside a SwingUtility.invokeLater(new
> Runnable(){ .... });
>
> Seb
>
> On Sun, Nov 14, 2010 at 9:21 PM, Jim Peterson <jimcp at cox.net> wrote:
>   
>> Seb,
>> My current problem is no example. I am using eclipse 3.5.2, and vtk 5.6.0.
>> The non JPanel versions of vtk do work in my java environment. TestVTKCanvas
>> does create a window with two panels in it, each displaying a cone, and each
>> independent of the other it appears. VTKSample however, runs and terminates
>> without any java window or panel displayed. I have no idea what to do to
>> make it display an example similar to your cassandra forum how-to. there are
>> no errors, just no display.
>>
>> any idea what the magic word is?
>> thanks,
>> Jim
>>
>> Sebastien Jourdain wrote:
>>     
>>> Hi Jim,
>>>
>>> I'm just saying that vtkCanvas/vtkPanel are classes that wrap a
>>> renderwindow/renderer into a Java graphical component class which is
>>> easier to use in the Java graphical world.
>>>
>>> You can give a look at
>>> http://dev.artenum.com/projects/cassandra/forum/how-to-use-eclipse-and-vtk
>>>
>>> And good luck,
>>>
>>>
>>>       
>>     
>
>   




More information about the vtkusers mailing list