When you run this example, a frame is created containing a content pane and the arrow render window. Upon resizing, the render window remains at the bottom left-hand side of the frame. I would have expected it to resize along with the frame.
In addition if you set up and use windowToImageFilter to write an image, the render window jumps out of the frame to the upper left of the display.
Ok, so I thought to replace vtkPanel with vtkCanvas. Now resizing works perfectly, except writing an image causes a crash.
I have attached the modified Arrow.java so you can run it and see the issues. Play with commenting in/out vtkPanel and vtkCanvas.
Ideally I would like the usual resizing and scaling to work, which seems to when vtkCanvas is used. However writing an image is problematic when either vtkPanel or vtkCanvas is used.
I'm sure you Java experts have come across this and solved it!
___________________________________________ Andrew J. P. Maclean
Powered by www.kitware.com