The test captures the text field’s screen coordinates and size before the GUI stabilization delay, allowing it to capture intermediate values.
Moving the capture after the delay fixes the issue. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8389648: [TEST_BUG] java/awt/TextField/CaretPositionTest/CaretPositionTest.java fails in OL-9 Changes: https://git.openjdk.org/jdk/pull/32239/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32239&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8389648 Stats: 10 lines in 1 file changed: 6 ins; 4 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/32239.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32239/head:pull/32239 PR: https://git.openjdk.org/jdk/pull/32239
