question: public void insertChars ( String c ) { String currentText = getText ( ) ; if ( ! validChar ( c ) ) { return ; } int pos = getCursorPosition ( ) + 1 ; if ( overwriteMode && pos <= currentText . length ( ) ) { setText ( currentText . substring ( 0 , pos - 1 ) + c + currentText . substring ( pos , currentText . length ( ) ) ) ; } else { if ( currentText . length ( ) + c . length ( ) > getMaxSize ( ) ) { return ; } setText ( currentText . substring ( 0 , pos - 1 ) + c + currentText . substring ( pos - 1 , currentText . length ( ) ) ) ; } if ( c . length ( ) > 1 ) { pos += c . length ( ) - 1 ; setCursorPosition ( pos ) ; return ; } increaseCursor ( ) ; }
target:  This method is responsible for adding a character into the field and is  the focal point for all input. It can be overriden to prevent a particular char from insertion or provide a different behavior for char insertion. It is the responsibility of this method to shift the cursor and invoke setText... <p>This method accepts a string for the more elaborate cases such as multi-char input and paste.