initialFocus

Declares that this component takes keyboard focus when its window first shows it - the field a form or a dialog opens on.

Focus is taken once, as soon as the component is on screen, and never again: a later re-show does not pull the keyboard back from wherever the user has moved it. Where focusTraversalIndex and orderedFocusTraversal decide the order Tab walks, this decides only where that walk starts.

Declaring it on two components of one window is a contradiction the modifier does not resolve: the one realized last takes the focus.

See also