String aString = e.text; char[] chars = new char[ aString.length() ]; aString.getChars( 0, chars.length, chars, 0 ); for ( int i = 0; i < chars.length; i++ ) { if ( !( '0' <= chars[ i ] && chars[ i ] <= '9' ) ) { e.doit = false; return; }
RE regex = null; try { regex = new RE( "[0-9.]*" ); } catch ( REException reException ) { } if ( !regex.isMatch( e.text ) ) { e.doit = false ; return;
    public void handleEvent( Event e ) {		String aString = e.text;		char[] chars = new char[ aString.length() ];		aString.getChars( 0, chars.length, chars, 0 );		for ( int i = 0; i < chars.length; i++ ) {			if ( !( '0' <= chars[ i ] && chars[ i ] <= '9' ) ) {				e.doit = false;				return;			}		}   }