I firmly disagree with you.

If you have multiple default buttons, so many accessibility features (that
folks with disabilities depend on!) will break. This would be a terrible
inclusion in the JavaFX API.

If you want that (and are willing to do the grunt work to make it
accessible), feel free to implement it yourself. But that should never ever
have any place in the JavaFX standard library.

On Tue, Jun 2, 2026, 10:54 AM PavelTurk <[email protected]> wrote:

> Hello everyone,
>
> I opened bug report JDK-8385779 "Multiple default buttons in one scene:
> only the last-added one responds to Enter" but it was closed
> because  "There should be only one default button".
>
> I don't agree with it. These are two real examples:
>
> 1. Split-pane UI (IDE-style): each pane has its own primary action
> (e.g., Search vs Apply), so multiple contextual default buttons exist
> but only the focused pane’s default is active at any time.
> 2. Inline modal dialogs: a secondary error dialog with its own default
> button appears over a primary input dialog, and after dismissing the
> error dialog the original dialog’s default action may already be stale
> or inactive.
>
> So, I suggest to reopen the issue.
>
> Best regards, Pavel
>

Reply via email to