On Tue, 10 Mar 2026 07:51:47 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> As per [JDK-8306119](https://bugs.openjdk.org/browse/JDK-8306119), many 
> classes were updated to request Focus with a MOUSE_EVENT cause, rather than 
> having an UNKNOWN cause.
> 
> However, Swingutiilites2 also request Focus without cause which can also be 
> updated to show appropriate cause
> Couple of SwingUtilities2 methods are updated with proper cause, which are 
> called from 
> 
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java#L2878
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicListUI.java#L2974-L2976
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java#L1064
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java#L1107
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java#L1199-L1202
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L4096
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L4132
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L4207-L4210
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/javax/swing/JInternalFrame.java#L1430-L1432
> https://github.com/openjdk/jdk/blob/9a26b4af34cd3e8690c5150da232eaa8bf3a82a6/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java#L1680

This pull request has now been integrated.

Changeset: 7484701e
Author:    Prasanta Sadhukhan <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/7484701e18d801914b85bf95fe020e85ebae40cc
Stats:     5 lines in 1 file changed: 1 ins; 0 del; 4 mod

8309041: Swingutilities2 methods requesting focus can have a Cause

Reviewed-by: tr, dnguyen

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

PR: https://git.openjdk.org/jdk/pull/30157

Reply via email to