Test sometimes fails due to Robot drag not happening for JInternalFrame..It is somewhat rare and fails probably 2 out of 30 iterations in mainline citing the following
----------System.out:(2/23)---------- d3d null cx 437 cy 246 ----------System.err:(14/854)---------- FRAME_COLOR Red: 255; Green: 200; Blue: 0 Pixel color Red: 255; Green: 255; Blue: 0 java.lang.RuntimeException: Internal frame is not correctly dragged! at bug8069348.main(bug8069348.java:111) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:583) at com.sun.javatest.regtest.agent.MainMethodHelper.executeModernMainClass(MainMethodHelper.java:56) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:140) at java.base/java.lang.Thread.run(Thread.java:1527) I tried to fix using staggered drag so instead of dragging from x1->x2, I used drag from x1->x11->x12->..x2 so that one big drag is avoided and it improves failure rate from 2/30 to 2/50 but it still fails sometimes. So, I used `DefaultDesktopManager `fast internal-frame dragging and not rely on flaky native Robot drag where sometimes mouse drag events is seen to be missed/not-delivered in linux..It still tests the intended `SunGraphic2D.copyArea` as it follows the path DesktopManager.beginDraggingFrame -> DesktopManager.dragFrame -> DefaultDesktopManager.dragFrameFaster -> RepaintManager.copyArea -> Graphics.copyArea -> SunGraphics2D.copyArea and it passes for 100 iterations --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8388486: javax/swing/JInternalFrame/8069348/bug8069348.java fails with Internal frame is not correctly dragged! Changes: https://git.openjdk.org/jdk/pull/32063/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32063&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8388486 Stats: 39 lines in 1 file changed: 33 ins; 5 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/32063.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32063/head:pull/32063 PR: https://git.openjdk.org/jdk/pull/32063
