Stabilized the test by disposing the frame at the end, adding an auto delay, called panel.getLocationOnScreen() in invokeAndWait(), formatting changes, etc And for better debugging, added captureScreen() for failure cases.
Testing: Tested using mach5 in all available platforms and attached the link in bug as a comment. ------------- Commit messages: - 8339943: Frame not disposed in java/awt/dnd/DropActionChangeTest.java Changes: https://git.openjdk.org/jdk/pull/20951/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20951&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8339943 Stats: 60 lines in 1 file changed: 33 ins; 13 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/20951.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20951/head:pull/20951 PR: https://git.openjdk.org/jdk/pull/20951
