[vtkusers] Re: vtkPanel extends AWT, why not SWING??

David Marshburn marshbur at cs.unc.edu
Tue Mar 13 16:54:28 EDT 2007


Date: Mon, 12 Mar 2007 18:08:08 +0000
From: "Bartlomiej Wilkowski" <wilku_83 at o2.pl>
Subject: [vtkusers] vtkPanel extends AWT, why not SWING??
To: vtkusers at vtk.org

> I have very big problem. I really dont know what is responsible for 
> that. Java or VTK. I am creating GUI application using VTK and the 
> problem is that I am using Swing. vtkPanel unfortunately extends 
> heigh-weighted component Canvas from AWT. This is not recommendable by 
> Java developers to use heigh-weighted components with light-weighted.

> In my application everything works fine on the computers with older 
> graphic cards. With the newer ones, I have the problems. Clicking on the 
> image which comes from vtk (from the widget) I mark the points selected. 
> In every refresh, the Java paint() method is called to fill the image 
> with the previously selected points. Unfortunately, on the better 
> graphic cards the points disappear after very short time. They don

hi bartek,

if i understand your problem correctly, within your vtkPanel, things 
sometimes appear and disappear.  is this correct?  if so, i doubt your 
problem has anything to do with awt vs. swing or lightweight vs. 
heavyweight components.

Canvas from which vtkCanvas is derived is a heavyweight component.  this 
means that, if anything, you should see your menus, for instance, pop up 
_behind_ your vtkPanel, but it shouldn't make things within your vtk 
canvas/panel/frame appear and disappear.

i would suggest that you check out your vtk code for the cause of this 
problem.

it's possible that there is some interaction with double-buffering 
functionality, too.

good luck!

-david



More information about the vtkusers mailing list