RFR: 8359061: Update and ProblemList manual test java/awt/Cursor/CursorDragTest/ListDragCursor.java [v4]

Damon Nguyen dnguyen at openjdk.org
Fri Jun 13 17:11:18 UTC 2025


On Fri, 13 Jun 2025 00:31:03 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update test to avoid PFJ
>
> test/jdk/java/awt/Cursor/CursorDragTest/ListDragCursor.java line 124:
> 
>> 122:         instructionsFrame.pack();
>> 123:         instructionsFrame.setLocation(300, 100);
>> 124:         instructionsFrame.setVisible(true);
> 
> Rearranging the lines provides better clarity. mainPanel layout can be set to BorderLayout for better placement of the instruction panel and button panel.
> 
> Suggestion:
> 
>         instructionsFrame = new Frame("Test Instructions");
>         Panel mainPanel = new Panel(new BorderLayout());
>         TextArea textArea = new TextArea(instructions, 15, 60,
>                                          TextArea.SCROLLBARS_NONE);
> 
>         Panel btnPanel = new Panel();
>         Button passBtn = new Button("PASS");
>         Button failBtn = new Button("FAIL");
>         btnPanel.add(passBtn);
>         btnPanel.add(failBtn);
> 
>         passBtn.addActionListener(e -> disposeFrames());
>         failBtn.addActionListener(e -> {
>             disposeFrames();
>             throw new RuntimeException("Test Failed");
>         });
> 
>         mainPanel.add(textArea, BorderLayout.CENTER);
>         mainPanel.add(btnPanel, BorderLayout.SOUTH);
> 
>         instructionsFrame.add(mainPanel);
>         instructionsFrame.pack();
>         instructionsFrame.setLocation(300, 100);
>         instructionsFrame.setVisible(true);

Thanks for the suggestion. Updated the test with the list of changes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25705#discussion_r2145549781


More information about the client-libs-dev mailing list