[vtkusers] vtkPanel problem on Windows

Ben Held ben.held at staarinc.com
Wed May 12 09:57:43 EDT 2004


I was able to get it to work by protected all of my Render calls with

if (this.getParent() == null || !this.getParent().isShowing()) return;

Thanks!

-----Original Message-----
From: Jeff Lee [mailto:jeff at cdnorthamerica.com]
Sent: Wednesday, May 12, 2004 8:54 AM
To: Ben Held
Cc: vtkusers at public.kitware.com
Subject: Re: [vtkusers] vtkPanel problem on Windows


Hi Ben,
The toplevel frame must be shown(realized) prior to calling Render(),
otherwise the RenderWindow doesn't get a valid WindowID, and proceeds to
create its own window.  There are examples in the distribution
(Wrapping/Java/) and Jarek Sacha has a slew of examples (search the
list, i believe they are on sourceforge).
-Jeff

Ben Held wrote:

>Shyam,
>
>Thanks for the suggestion.  However, the latest vtkPanel doesn't explicity
>require a parent set (or I don't see it).  I just create the vtkPanel in my
>JPanel-derived class, and do an add call to add it to the layout.
>
>Any thoughts?
>
>Ben
>
>-----Original Message-----
>From: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org]On Behalf Of
>R K Shyam Prakash
>Sent: Wednesday, May 12, 2004 8:29 AM
>To: 'Ben Held'; vtkusers at public.kitware.com
>Subject: RE: [vtkusers] vtkPanel problem on Windows
>
>
>Ben,
>
>
>
>>I am trying to upgrade my Java 1.4 project to work with the
>>latest VTK.  I have a JPanel with an embedded vtkPanel.  This
>>works, except that when RenderCreate is called inside of
>>vtkPanel, I get another window on my desktop, with a title of
>>"Visualization Toolkit - Win32OpenGLRenderer". This window
>>contains the same display as my vtkPanel does, but usually
>>locks up. What is this window and how can I prevent it from
>>being created?
>>
>>
>
>Looks like you are calling vtkPanel.Render() before the vtkPanel is
>realized. Do not make any Render calls until the parent window of your
>vtkPanel is realized.
>
>--Shyam
>
>_______________________________________________
>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