Hello all, I am developing an application where I'd like a user to be able to click on various parts of a scale (outside of Batik) and have it update the display area. I have it working using a CardLayout where each component of the CardLayout is a separate JSVGCanvas. As the user makes selections, the appropriate card is shown.
This is working as I'd like it to, however, when I resize the application a large amount (not scientific I know -- small resizes have no trouble, maximizing for example causes the unwanted behaviour) I get a "java.lang.OutOfMemoryError: Java heap space" I know I can increase the size of the Java heap, but I was hoping to understand why this was happening. If I don't resize in a large increment at once, I see no problems. It is possible that my choice of having separate JSVGCanvas' for each card is a mistake; however it resizes everything appropriately and all. I tried removing the CardLayout and, on user selection, add the JSVGCanvas to the panel directly (so on resizes only the currently visible canvas is resized). The problem I saw with this approach is that the JSVGCanvas wasn't scaled and didn't maximize the display area as it does when I load them all at initialization in the CardLayout. If I can provide any additional information, please let me know. Thanks in advance for any thought you might have on this. -S
