Resize View

I have a view that is contained in an applet. When the user resizes the page I want to resize the view. I have the Javascript calling into the applet but am not sure what to set on the view to make it resize correctly. If i just call setSize on the view it seems to work but the scroll bars are gone and the view extends beyond the visible page. How do I resize the view correctly?

I would change the size of the applet, and let the applet’s layoutmanager resize the components inside it, including the JGoView. But I haven’t tried this to see if there are any problems.

I thought about that but it is currently done with an XYLayout. It would be a fair amount of work to redo it to be grid bag or something else. I need to explicitly set the size.

Try calling JGoView.validate(). Maybe also updateView().

I finally got back to this project and tried implementing this but I have an issue with it. I got the resize working but if I click in the background of the map (view) it reverts to the original size. I have tried setting every size I can think of but it doesn’t seem to matter. Any ideas?

Does it work and resize correctly in appletviewer as well as a stand-alone application?

You know what, I only tried it in applet viewer but I can try it in a browser and see…stay tuned. :)

OK, doesn’t matter if it is applet viewer or a browser, it still does the same thing. The weird thing is, if I click on an entity in the view (node or link) it does not revert to original size. Only if I click in the background.