public static void setKeyboardFocus ( final Actor actor ) { if ( actor != null && actor . getStage ( ) != null ) { actor . getStage ( ) . setKeyboardFocus ( actor ) ; } }
Null - safe method for setting keyboard focus .