On Thu, 23 Jul 2026 06:18:04 GMT, Jyothilekshmi <[email protected]> wrote:

>> test/jdk/java/awt/Panel/PanelRepaint/PanelRepaint.java line 73:
>> 
>>> 71:         Frame f = new Frame("Panel Repaint Test");
>>> 72:         f.setLayout(new FlowLayout());
>>> 73:         f.setSize(620, 288);
>> 
>> This `setSize` relies on size of frame insets which include the system 
>> window decorations. To ensure the frame fits the `PanelRepaint pr` fully, 
>> you should calculate the size of the frame by combining the size of the 
>> panel and the insets of the frame.
>
> I rechecked the current hard-coded frame size with setResizable(false), and 
> it looks fine. I do not see the scrollable panel contents showing below the 
> horizontal scrollbar

This is still a concern. I ran this test on Windows with High DPI display, and 
the horizontal scroll bar at the bottom is clipped. It's accessible, but the 
tester has to be very precise.

You probably want to add larger margins, or calculate the frame height 
(preferably use `pack` and set preferred size for the panel), or increase the 
frame height to ensure there's “white space” at the bottom so that the 
horizontal scroll bar always fits into the window.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31687#discussion_r3673260819

Reply via email to