| # GUI Commands User Guide ## Version 2.1 |
| # Utility Methods Two methods are provided for managing the focus of the various buttons produced by commands. ## Command.requestFocusIn(Container) This method finds the first attachment of the command in the specified container and attempts to focus it. This method is available to both `ActionCommands` and `CommandGroups`. ## ActionCommand.requestDefaultIn(RootPaneContainer) This method finds the first attachment of the command in the specified container and sets it to be the default by calling `RootPaneContainer.setDefaultButton(JButton)`. This method is not available to `CommandGroups` or `ToggleCommands` as they create `JToggleButton` instances (that don't extend `JButton`). |