If the Swing demo is maximized after start, the desktop area for the JInternalFrames increases, but the frames are not visible in this new area. The frames are only visible inside the previous smaller area. The Classpath logo is also centered in this smaller area, being up and left from its expected place.
To reproduce, maximize (or resize) the Swing demo application, open any demo internal frame like JTree and drag it to the right - it will disappear before reaching the corner of the demo application window.
This is caused by the exceptional statement in ViewportLayout.layoutContainer. The view size is not set to the port size if the parent is JScrollPane. This bug disappears if the exceptional statement is removed. However in this case scrollbars start behave strangely if the frame was resized outside the component preferred size and now is being resizing back to the smaller size.
Created attachment 11346 [details]
The bugs seems reduces by the compensation of other bug in the ViewportLayout. The compensation should be removed. The original bug is fixed in ScrollPaneLayout.
Fixed by attached path