[vtkusers] Swing Based vtkPanel

Gopalakrishnan, Gowri Gowri.Gopalakrishnan at inteq.com
Tue Mar 5 09:13:14 EST 2002


If you look in the sun's web site on JNI (java native interface) and the
native code for vtkPanel.java you will see that they are quite identical.
It used to be that you could grab drawing surface information and the window
handle only from canvas (it is a undocumented codes in jdk). But I have come
across something similar in Swing. In vtk 3.2 it is done using canvas, but
in vtk4.0 I do not know. You cannot use anything else other than canvas (now
a swing component - I forgot which )to get this information from sun's jdk.

Also with your swing problem - even if you got it to work now you might end
up with strange behaviours in swing components when they are put on the awt
component. Event handling especially can be troublesome. If you have not
done too much dev. already it is a good/wise idea to change to completely
swing. Mixing awt and swing leads to frustration.

Gowri




More information about the vtkusers mailing list