[vtkusers] vtkPanel to lightweight component

Gopalakrishnan, Gowri Gowri.Gopalakrishnan at inteq.com
Thu Oct 17 04:20:17 EDT 2002

Summary on the vtkPanel + lightweight + heavy weight

First of all here is a link to a site where the jframe instead of canvas is


The disadvantage with this is that you have to extract the window handle in
java and pass it to C and take all the precaution necessary avoid multiple
access etc.... also if I remember correctly there is some hitch with
notify()... check it out anyway...if you need help let me know...

Secondly if you are using GUI if possible don't mix awt and swing
components. AWT components being heavy weight will ALWAYS dominate the swing
items. Ex: if you have a jpopup over a awt canvas, canvas will block the
jpopup. Basically your popup will be hidden behind the canvas.... Sun says
you can mix awt and swing, but there are lot of hassles (events are another
nightmare when you mix....)

Hope this helps


-----Original Message-----
From: Jeff Lee [mailto:jeff at cdnorthamerica.com] 
Sent: 15 October 2002 20:42
To: Gary M. Stump
Cc: vtkusers at public.kitware.com
Subject: Re: [vtkusers] vtkPanel to lightweight component

what is your requirement?  you can already use awt components inside 
swing i.e. place the canvas inside a JPanel.

Gary M. Stump wrote:

>I have written a Java applicaiton that uses vtkPanel, however vtkPanel uses
>Canvas which is a heavyweight component.  I would eventually like to embed
>vtkPanel into a Swing application, thus I would like to make vtkPanel a
>lightweight component.  Within vtkPanel I tried using JPanel and JComponent
>instead of Canvas but to no luck.  Has anyone out there encountered this
>problem before ??  thanks   -Gary
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at:
>Follow this link to subscribe/unsubscribe:

Jeff Lee <jeff at cdnorthamerica.com>
Software Engineer
CD North America
21 Lafayette Street, Suite 230
Lebanon, NH 03766
Tel:    (603) 643-9993 ext. 109
Fax:    (603) 643-9994

This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list