[vtkusers] VTK 4.0 and JInternalFrame (java 1.4)

Jeff Lee jeff at cdnorthamerica.com
Thu Mar 28 07:23:22 EST 2002


Hi Thomas,
JInternalFrame has some very different ways of managing repaints on its 
children - it tries to be smart in its handling of damaged areas, and 
uses a RepaintManager to do all of this.  Are you using the cvs version 
of vtk?   Here are some of my observations:  Adding vtkInternalPanels to 
a JDesktopPane with other JInternalFrames causes the panels to disappear 
when you click on the borders in a different order than you added them 
to the desktop (this happens regardless of what is inside the other 
JInternalFrames).  If you click on the vtkPanel after it turns grey, 
your error occurs.  If you don't have the drag mode set to LIVE in the 
JDesktopPane, the code will hang or die.  I have noticed that if I don't 
call setVisible(true) on the internal frame, the vtkPanel shows up, and 
you can interact with it fine - but you can't move it.  Overlapping 
works fine (but you still get heavyweight/lightweight behavior of 
course).  My gut feeling is that this is a problem with the JDesktopPane 
and how it manages its children (DesktopManager)  I will dig around and 
try to find out why this is happening and try to suggest some possible 
solutions.  
-Jeff
Thomas Krueger wrote:

>Hi all,
>we use j2sdk 1.4 and VTK 4.0 on linux. As default unnamed packages (classes
>without package definition) are no longer allowed in java 1.4, we moved the
>vtkPanel to the vtk package (with changes in Common/vtkJavaAwt.h).
>This configuration works fine with most applications but causes an error with
>JInternalFrames.
>
>If we use the vtkPanel in JInternalFrames on a main Window, "overlapping" the
>vtkPanel or minimizing the Frames causes the JVM to crash (see attached error).
>The "overlapping" JInternalFrames appear behind the VTK-RenderWindows. In
>contrast, the vtkPanel works fine, if we use separate JFrames.
>
>Any suggestions? Is there another way of getting vtkPanel to work with jdk1.4?
>Thanks,
>Tom
>
>--- error log ---
>An unexpected exception has been detected in native code outside the VM.
>Unexpected Signal : 11 occurred at PC=0x5FEA7B1C
>Function=XMesaDitherColor+0x16D8
>Library=/usr/lib/libGL.so.1
>
>Current Java thread:
>	at vtk.vtkPanel.RenderInternal(Native Method)
>	at vtk.vtkPanel.Render(vtkPanel.java:83)
>	- locked <0x465a3bf8> (a vtk.vtkPanel)
>	at vtk.vtkPanel.paint(vtkPanel.java:91)
>	at sun.awt.RepaintArea.paint(RepaintArea.java:180)
>	at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:339)
>	at java.awt.Component.dispatchEventImpl(Component.java:3586)
>	at java.awt.Component.dispatchEvent(Component.java:3367)
>	at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
>	at
>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
>	at
>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
>	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
>	at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
>
>Dynamic libraries:
>08048000-0804d000 r-xp 00000000 08:09 284674     /home/j2sdk1.4.0/bin/java
>....(more on demand)....
>_______________________________________________
>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