RFR: 6741930: JOptionPane doesn't honour Focus Traversal Policy

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Feb 18 05:13:13 UTC 2026


On Wed, 18 Feb 2026 05:00:46 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> > I believe it is honoring that too. It will check and requestFocus to `selectInitialValue(op)` initialValue and then fallback to `initialFocusComponent` if it is not set..
> 
> The check for hasCustomComponents bypasses the use of initialFocusComponent, so we need to update the specification one way or another. we need to [decide](https://bugs.openjdk.org/browse/JDK-6741930?focusedId=12228349&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-12228349) what behavior is correct.

initialFocusComponent is still used inside hasCustomComponents  check too but priority is given to passed op argument first otherwise there's no need to pass the argument and we can as well remove the parameter..

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

PR Comment: https://git.openjdk.org/jdk/pull/29738#issuecomment-3918707901


More information about the client-libs-dev mailing list