Bug 27296 - Swing demo desktop area after maximizing is still clipped to the previous smaller size
Summary: Swing demo desktop area after maximizing is still clipped to the previous sma...
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: 0.90
: P3 normal
Target Milestone: 0.91
Assignee: Audrius Meškauskas
Depends on:
Reported: 2006-04-25 05:56 UTC by Audrius Meškauskas
Modified: 2006-05-07 19:59 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:

Proposed fix (650 bytes, patch)
2006-04-28 19:08 UTC, Audrius Meškauskas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Audrius Meškauskas 2006-04-25 05:56:41 UTC
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.
Comment 1 Audrius Meškauskas 2006-04-28 18:27:06 UTC
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. 
Comment 2 Audrius Meškauskas 2006-04-28 19:08:49 UTC
Created attachment 11346 [details]
Proposed fix

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.
Comment 3 Audrius Meškauskas 2006-04-28 19:10:10 UTC
Fixed by attached path