I have a jTable with four columns. the first column holds some code of members, second column holds their admission date and third column holds their validation expiry date. I've to remove the rows from the column if the expiry date is more than 10 days from the system date.

I'm writing the code something like this:

```
    public void expire(){

    try{
    DefaultTableModel model = (DefaultTableModel) empTbl.getModel();
    int col=2;
    int rows = empTbl.getRowCount();
    for(int row=0; row<=rows; row++){

     SimpleDateFormat formater = new SimpleDateFormat("dd-MM-yyyy");
     Calendar currentDate = Calendar.getInstance();
     String d = formater.format(currentDate.getTime());
     Date haatdinPisorTarikh = (Date)formater.parse(d);   

     String expdate = (String)empTbl.getValueAt(row, col);
     Date expire=(Date)formater.parse(expdate);
     Calendar expireDate = Calendar.getInstance();
     expireDate.add(Calendar.DATE, -10);

     if(expireDate.after(haatdinPisorTarikh)){
     model.removeRow(row);
     }
     }

      }catch(ParseException ex){}
       }

```

This method is not working. Where am I doing mistake ?
Please help...

![enter image description here](https://i.stack.imgur.com/snmuC.jpg)