code: private long getLongValue(String sLong) {
          long ret;
          try {
              ret = Long.valueOf(sLong);
          } catch (Exception ex) {
              ret = -1;
          }
          return Math.max(ret, -1);
      }
docs: GEN-LAST:event_jCheckBoxRelativeTimeActionPerformed