On Fri, 13 Jun 2025 00:31:03 GMT, Harshitha Onkar <hon...@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