int row = jTable.getSelectedRow();
if(row == -1) { // ADD
String dossier = getJTextField().getText();
if(dossier.length() > 0) {
ListeFichiers lf = new ListeFichiers(new File(dossier));
// List of Folders added
Vector existantFolders = new Vector();
File folder;
for(int i = 0 ; i < getJTable().getRowCount() ; i++) {
folder = new File((String)getJTable().getValueAt(i,0));
existantFolders.add(folder);
}
boolean delete = false;
if(!lf.isChild(existantFolders)) {
ListeFichiers lf2;
for(int i = existantFolders.size() - 1 ; i >= 0 ; i--) {
lf2 = new ListeFichiers(((File)existantFolders.get(i)));
if(lf2.isChild(new File(dossier))) {
delete = true;
getJTableModel().removeRow(i);
}
}
String [] dos = {dossier};