I forgot to copy the users list on this. Scott replied that this solution worked for him.<div><br><div class="gmail_quote">On Thu, Nov 1, 2012 at 7:57 AM, Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com" target="_blank">jeff.baumes@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><div>On Mon, Oct 29, 2012 at 3:04 PM, Scott Kelly <span dir="ltr"><<a href="mailto:stk@veritegroup.com" target="_blank">stk@veritegroup.com</a>></span> wrote:</div>
</div><div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div>I'm having issues trying to integrate a vtkGraphLayoutView into a Jframe. The java app starts fine and the vtk panel sometimes initially displays the graph but the window flashes and the graph disappears anytime you try to interact with the window. </div>
<div><br></div></div></blockquote><div><br></div></div>I verified this on Windows 7 with Java 1.7 and Java 1.5 and was able to reproduce the problem in both cases. I believe what happened is that there were some tweaks to how VTK views can associate with other render windows that were not propagated to the Java examples.<div class="im">
<div>
<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word"><div></div><div>
I'm using Java 1.7_09, VTK 5.10.1 and Win7 x64 (I've also tried MacOS)</div>
<div><br></div><div>An example of the behavior can be reproduced with both the Focus.java and TreeViews.java examples included with VTK. My code pretty much follows how these two examples include a vtkRenderWindowPanel in a Jframe.</div>
<div><br></div><div>If I try to render the GraphLayoutView directly everything works fine, but the window is outside of the Jframe. </div></div></blockquote><div><br></div></div><div>Try changing code like this:</div><div>
<br>
</div><div>panel = new vtkRenderWindowPanel(view.GetRenderWindow());</div><div><br></div><div>with these two lines:</div><div><br></div><div>panel = new vtkRenderWindowPanel();</div><div>view.SetRenderWindow(panel.GetRenderWindow());</div>
<div><br></div><div>This sets the panel's render window on the view instead of attempting to do the reverse. This made TreeViews.java function much better, though there was still a bit of a glitch for me on first render (all grey). Once I clicked in the window all was well.</div>
<div><br></div></div></div>
</blockquote></div><br></div>