public void insertString( int off, String string, AttributeSet abr ) throws BadLocationException {
            if ( string == null ) {
                return;
            }
            boolean ok = true;
            char[] chars = string.toCharArray();
            for ( int i = 0; i < chars.length; i++ ) {
                try {
                	if (!( String.valueOf( chars[i] ).equals("."))){
                		Integer.parseInt( String.valueOf( chars[i] ) );
                	}
                } catch ( NumberFormatException exc ) {
                    ok = false;
                    break;
                }
            }
            if ( ok )
                super.insertString( off, new String( chars ), abr );
        }