Window.setDefaultButton

Designate the button activated by Enter when focus is on a non-button control. A focused push button is always its own default regardless of this setting (native dialog behavior). Pass null to clear.

class Window
void
setDefaultButton

Meta