Sets the defaultButton
property,
which determines the current default button for this JRootPane
.
The default button is the button which will be activated
when a UI-defined activation event (typically the Enter key)
occurs in the root pane regardless of whether or not the button
has keyboard focus (unless there is another component within
the root pane which consumes the activation event,
such as a JTextPane
).
For default activation to work, the button must be an enabled
descendent of the root pane when activation occurs.
To remove a default button from this root pane, set this
property to null
.
defaultButton | the JButton which is to be the default button |
JButton.isDefaultButton
Diagram: RootPaneContainer