[vtkusers] VTK Animations with Java Swing

Frederic DANESI frederic.danesi at dinccs.com
Fri Feb 22 09:08:19 EST 2008



My best shot is to say : why don’t you simply rewrite your own vtkMyPanel 



You will find in vtk.jar the source files for vtkPanel.java and

Write your own vtkMyPanel by copying and modifying vtkPanel.java : your
vtkMyPanel can simply extend JCanvas instead of Canvas 
 or even better :
extend directly JPanel 
 you will avoid embedding your vtkMyPanel in a




De : vtkusers-bounces+frederic.danesi=dinccs.com at vtk.org
[mailto:vtkusers-bounces+frederic.danesi=dinccs.com at vtk.org] De la part de
William E Lucarell
Envoyé : vendredi 22 février 2008 14:39
À : vtkusers at vtk.org
Objet : [vtkusers] VTK Animations with Java Swing


I am developing a Java Swing application to animate 2D and 3D drawings.  I
am embedding a JPanel which houses a vtkPanel.  The vtkPanel is derived from
AWT component Canvas.  However, my application is in Swing and I’d like to
automatically animate my application without any flickering of the image.
My application should be able to start, stop, and continue animations.  What
would be the best way of going about this?  Is it doable in Swing?


Here is some of the code that embeds the VTK drawing.  The drawing renders
fine.  I just want to be able to animate it. Note: vtkWindow is a JPanel
that I created in NetBeans:


        vtkPanel            p1;







Bill Lucarell



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080222/1fac7463/attachment.htm>

More information about the vtkusers mailing list