> Due to incorrect AWT Frame inset values being returned from native code, few > of the components in the frame were not being shown completely on Windows. > With the proposed fix, correct insets are obtained which in turn sizes and > displays the frame correctly. > > The default insets obtained from the Win system was adding only > `::GetSystemMetrics(SM_CXSIZEFRAME)` for **WS_THICKFRAME** and the insets > were off by few pixels from the expected value. > `::GetSystemMetrics(SM_CXPADDEDBORDER)` is additionally added to top, bottom, > left and right insets to account for the 6px. [GetSystemMetric() > Document](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetrics) > > A test case is added which checks if the actual frame size is equal to the > expected frame size (frame.getSize() == frame.getPreferredSize()), thus > checking if frame.pack() works as expected. > > Following are before and after screenshots - > 
Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: removed os version check, added review changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/9118/files - new: https://git.openjdk.org/jdk/pull/9118/files/afe3afbc..a6a2e429 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=9118&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=9118&range=00-01 Stats: 43 lines in 2 files changed: 15 ins; 20 del; 8 mod Patch: https://git.openjdk.org/jdk/pull/9118.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9118/head:pull/9118 PR: https://git.openjdk.org/jdk/pull/9118