int selIndex = sourceDirList.getSelectedIndex(); if (selIndex >= 0) { Project project = getCurrentProject(); project.removeSourceDir(selIndex); DefaultListModel listModel = (DefaultListModel) sourceDirList.getModel(); listModel.removeElementAt(selIndex); }
    private void removeSrcDirButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeSrcDirButtonActionPerformed	// if (sourceDirList.hasCurrentSelect()) {	//   Project project = getCurrentProject();	//   String currSelection = sourceDirList.getCurrentSelection();	//   project.removeSourceDirectory(currSelection);	//   sourceDirList.removeCurrentSelection();	// }    }//GEN-LAST:event_removeSrcDirButtonActionPerformed