private int parseLimit(String text,int onError){
  try {
    return Integer.parseInt(text);
  }
 catch (  NumberFormatException e) {
    return onError;
  }
}

private int parseLimit ( String text , int onError ) { try { return Integer . parseInt ( text ) ; } catch ( NumberFormatException e ) { return onError ; } }
convert the control ' s content into a number .
