RFR: 8368185: Test javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java failed: Synth ButtonUI does not handle PRESSED & MOUSE_OVER state

Tejesh R tr at openjdk.org
Fri Sep 26 13:57:03 UTC 2025


On Tue, 23 Sep 2025 07:10:11 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Test frame is changed to Red for Mouse PRESSED and MOUSE_OVER state but it seem time is too less before it is moved to Green when mouse press is released so it retrieves Green instead of Red.
> Also, the pixel color retrieval point is conflicting with mouse cursor position, which gets picked up during `robot.createSceenCapture` execution so retrieval point is moved slightly up instead of down.
> 
> 100 iterations of the test passed in all platforms.

Test is not passing in my local machine - macos aarch64 machine. Failing with this error:

Button center point: java.awt.Point[x=298,y=219]
Red: 181; Green: 182; Blue: 186
Exception in thread "main" java.lang.RuntimeException: Synth ButtonUI does not handle PRESSED & MOUSE_OVER state
	at bug6276188.main(bug6276188.java:104)

test/jdk/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java line 26:

> 24:  * @test 1.4 08/08/05
> 25:  * @key headful
> 26:  * @bug 6276188

`"1.4 08/08/05"` can be removed from `test` tag

test/jdk/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java line 56:

> 54:     private static JFrame testFrame;
> 55: 
> 56:      // move away from cursor

`private static Point p; ` can be local variable.

-------------

PR Review: https://git.openjdk.org/jdk/pull/27444#pullrequestreview-3272399825
PR Review Comment: https://git.openjdk.org/jdk/pull/27444#discussion_r2382480107
PR Review Comment: https://git.openjdk.org/jdk/pull/27444#discussion_r2382482387


More information about the client-libs-dev mailing list