How do I get scrollbars in the main JFrame when the size of a JInternalFrame becomes greater than that of the main JFrame?
Created May 4, 2012
Sandip Chitale
Add the JDesktopPane containing the JInternalFrames to a JScrollPane.
Make sure that the preferredSize of the JDesktopPane is at least equal to the rectangle enclosing all the JInternalFrames (for that you will have to listen to events (on JInternalFrames) using to ComponentListener and recompute new size of JDesktopPane in the componentResized and componentMoved callbacks). After adjusting the size of JDesktopPane call revalidate() on it.