GUI Commands 2.0 has arrived! Find out what's new and improved.
Focus and Default Buttons

Two method 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).