On Windows, the insets obtained for a Non-Resizable AWT Frame was different when frame.pack() was called and subsequent call to frame.getInsets() or frame.getPreferredSize(). Due to this, the actual and preferred size differed when frame.pack() was called for Non-Resizable frame (on Windows).
Earlier the insets returned when frame.getInsets() was called was that of a Resizable frame and not the correct insets associated with Non-Resizable frame. Fix is added to native code to get the correct insets. The test - AwtFramePackTest.java has been updated to test actual and expected/preferred size for both Resizable and Non-Resizable Frames. ------------- Commit messages: - Non-Resizable AWT Frame insets fix Changes: https://git.openjdk.org/jdk/pull/9954/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9954&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8288325 Stats: 49 lines in 2 files changed: 26 ins; 6 del; 17 mod Patch: https://git.openjdk.org/jdk/pull/9954.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9954/head:pull/9954 PR: https://git.openjdk.org/jdk/pull/9954