[vtkusers] disappearing windows in Java w/vtk

Mark Hünken mark.huenken at web.de
Wed Dec 10 01:42:12 EST 2003


A quick work-around that may solve some of these problems is to
uncomment the requestFocus line in vtkPanel.mouseEntered(). This way a
JFrame that pops up over a VTK canvas stays in front until you click on
the VTK canvas to give it focus...

Am Mi, 2003-12-10 um 05.41 schrieb Shyam Prakash:
> Chris,
> 	This is the problem of mixing lightweight and heavyweight java
> components. vtkCanvas extends java.awt.Canvas and hence it is a
> heavyweight component where as all your swing components are
> lightweight. The heavy weight components do not follow the z-buffer
> order and they always remain on top. Follow these links and you can find
> more information.
> 
> http://java.sun.com/products/jfc/tsc/articles/mixing/
> 
> http://www-106.ibm.com/developerworks/java/library/j-heavy.html
> 
> http://www.j3d.org/faq/swing.html#tabs
> 
> http://www.j3d.org/tutorials/quick_fix/swing.html
> 
> --Shyam
> 
> 
> > -----Original Message-----
> > From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org] On Behalf
> Of
> > Christopher M. Navarro
> > Sent: Wednesday, December 10, 2003 4:56 AM
> > To: vtkusers at vtk.org
> > Subject: [vtkusers] disappearing windows in Java w/vtk
> > 
> > 
> > I have a JFrame that contains a vtkCanvas object and then another
> JFrame
> > that has a control window with widgets for turning things on and off,
> etc.
> > The problem I am having shows up on my Windows XP system where if I
> move
> > the control palette frame over the frame that contains the vtkCanvas
> > object and then move the mouse out of the palette frame and into the
> frame
> > containing the vtkCanvas, the palette frame disappears behind the
> frame
> > containing the vtk object(s).  I'm pretty sure its a window management
> > thing since on my linux box I don't have this problem.  It gets pretty
> > annoying when you have to move things around so that the vtk frame
> doesn't
> > hide other windows or you will lose visibility of them when they lose
> > focus.  Is there something on the java side that can keep this from
> > happening?  It would be nice to be able to have one window over
> another
> > and have it stay that way when the focus moves to the vtkframe so
> > multiple windows can be seen without them being completely separated.
> > I've thought about doing something like TestInternalFrames.java but I
> was
> > wondering if there is a quicker fix.  Thanks.
> > 
> > p.s. using a recent vtk nightly on redhat 9 & windows xp as my test
> > systems.
> > 
> > regards,
> > 
> > chris
> > 
> > 
> > _______________________________________________
> > 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://www.vtk.org/mailman/listinfo/vtkusers
> 
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list