Call Robot.waitForIdle() after createUI and before getting the location of the JSpinner component in the test: javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java.
This is needed to ensure all the events for creating and displaying the frame are processed before interacting with the components on the screen. ------------- Commit messages: - 8282147: waitForIdle after creating frame in JSpinnerMouseAndKeyPressTest.java Changes: https://git.openjdk.java.net/jdk/pull/7545/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7545&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8282147 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7545.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7545/head:pull/7545 PR: https://git.openjdk.java.net/jdk/pull/7545