[vtkusers] Fwd: jsplitpane vtkCanvas in Java

Baliki baliki balikivtk at gmail.com
Fri Nov 6 06:29:12 EST 2009


I think the problem is known and it is the icompatibility AWT and Swing.
Canvas is incompatible with JSplitPane.
If someone has ANY idea, please post it.

----------------------------------------------------------
----------------------------------------------------------
Hello,
i have a Jsplitpane which divdes the window into two sides, left and right.
In left side i add a vtkCanvas with a vtkvolume in it (say c1).
In right side i also add a vtkCanvas with a vtkvolume (the canvas can be c2
or c3).
I have JCheckButton which defines which vtkvolume to add in right side (c2
or c3).
c1,c2,c3 are vtkCanvas with a vtkVolume in them.

I use split.setLeftComponent(c1) and split.setRightComponent(c2)

When i run the program for the first time, everything is ok.
I press JCheckButton and c3 replaces c2.-->ok
I press again JCheckButton and nothing appears! It is supposed to appear c2
again.
I've tried every possible way of validate, repaint, etc.
I noticed that if i set split.setRightComponent(new vtkCanvas()), instead
of  split.setRightComponent(c2), it works (in terms of it appears the
Canvas...)
I think that there is something wrong with the paint() and/or upadate()
method in vtkCanvas, vtkPanel and Canvas.

I would appreciate every help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091106/b9389c99/attachment.htm>


More information about the vtkusers mailing list