@Override public void exitWindowClosed(){
  if (source != null && source.dirty) {
    int check=JOptionPane.showConfirmDialog(null,i18n.get(MetaDbfTableModel.class,"Do_you_want_to_save_your_changes","Do you want to save your changes?"),i18n.get(MetaDbfTableModel.class,"Confirm_Close","Confirm Close"),JOptionPane.YES_NO_OPTION);
    if (check == JOptionPane.YES_OPTION) {
      fireTableStructureChanged();
    }
 else {
      source.cleanupChanges();
    }
  }
  super.exitWindowClosed();
}

@ Override public void exitWindowClosed ( ) { if ( source != null && source . dirty ) { int check = JOptionPane . showConfirmDialog ( null , i18n . get ( MetaDbfTableModel . class , "Do_you_want_to_save_your_changes" , "Do you want to save your changes?" ) , i18n . get ( MetaDbfTableModel . class , "Confirm_Close" , "Confirm Close" ) , JOptionPane . YES_NO_OPTION ) ; if ( check == JOptionPane . YES_OPTION ) { fireTableStructureChanged ( ) ; } else { source . cleanupChanges ( ) ; } } super . exitWindowClosed ( ) ; }
decide what to do when the window closes .
