[vtkusers] 3 questions about VTK + Java.

Gopalakrishnan, Gowri Gowri.Gopalakrishnan at inteq.com
Wed Nov 27 04:36:04 EST 2002


I am not sure if anyone replied to you earlier. So here are my answers

1. For getting more examples for java just ask in the user group if any one
has sample for what you specially need. Documentation for vtk java is very
poor

2. vtkPanel.java - I can give you a working version if you want. Or you can
get it from the vtk page. Vtkdrawingsurface is the awt canvas. This does not
mean that swing components cannot be used with java. You just have to be
very careful while mixing awt and swing. I use swing for GUI and a native
interface for rendering (JNI) (similar to the vtkpanel)

3. I think if you use default vtkpanel that comes with vtk then mouse and
key events are handled (default) by the vtk rendering window directly. If
you want, you can intercept using one of java listeners (this is possible by
setting the parent window id properly for the rendering window) and then
passing it to vtk. If you are already at this stage then just post in the
group asking if some has sample code. I can send you my native interface
code and key, mouse interaction, but since I do not use vtkpanel it may not
be of much use...


Regards
Gowri




-----Original Message-----
From: tony Lincoln [mailto:tony_lincoln at yahoo.com] 
Sent: 25 November 2002 19:05
To: vtkusers at public.kitware.com
Cc: j.gao at dkfz.de
Subject: [vtkusers] 3 questions about VTK + Java.

Dear all, 

I am a beginner of VTK. Here 3 questions about VTK +
Java:

1. How to get more VTK example codes for java from
Internet? What I have is only cone.java, and it seems
not enough.

2. How to combine String and VTK together. The book
"VTK user guide" told me there is a vtkPanel class in
vtk.jar, which can combine these 2 together. I can not
find it in vtk.jar, but find it in vkt40Src directory.
With it I tried to run simpleVTK.java, but the error
information is:
Can not locate the beginning point of your program 
_DSGetDrawingSurface at 8 on the awt.dll.
That seems that Swing and VTK are still not combined
together.

3. How to produce Mouse Event on the 3D object in VTK
viewer window? 
For example, Using mouse to rotate the 3D object
around its center?

many thanks.
tony

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
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