On Sat, 11 Jun 2022 00:30:20 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:
>> src/java.desktop/windows/native/libawt/windows/awt_Window.cpp line 1440: >> >>> 1438: ::GetSystemMetrics(SM_CXDLGFRAME); >>> 1439: m_insets.top = m_insets.bottom = >>> 1440: ::GetSystemMetrics(SM_CYDLGFRAME); >> >> It's likely needed here as well. >> >> Make the frame non-resizeable to get into this block. > > Added `SM_CXPADDEDBORDER` to Non-Resizable Frames. After the addition of > padded border the second button is being shown similar to Resizable frames. > But unlike resizable frames, for the non-resizable frames - the actual frame > size and the preferred size are different. Ideally the frame.getSize() should > be equal to preferred size when frame.pack() is used. Side-by-Side comparison of Resizable and Non-Resizable frames - Resizable frame slightly wider and taller compared to non-resizable. On UiScale =1, Resizable Frame size= java.awt.Dimension[width=241,height=119] Non-Resizable Frame size = java.awt.Dimension[width=237,height=115]  ------------- PR: https://git.openjdk.org/jdk/pull/9118