public static TextBox initTextBox ( TextBox box , String text , int maxLength , int visibleLength ) { if ( text != null ) { box . setText ( text ) ; } box . setMaxLength ( maxLength > 0 ? maxLength : 255 ) ; if ( visibleLength > 0 ) { box . setVisibleLength ( visibleLength ) ; } return box ; }
Configures a text box with all of the configuration that you re bound to want to do . This is useful for configuring a PasswordTextBox .