public void setFocus ( boolean focus ) { if ( focus ) { if ( currentFocus != null ) { currentFocus . setFocus ( false ) ; } currentFocus = this ; } else { if ( currentFocus == this ) { currentFocus = null ; } } this . focus = focus ; }
Indicate whether this component should be focused or not