int selIndex = jarFileList.getSelectedIndex(); if (selIndex >= 0) { Project project = getCurrentProject(); project.removeJarFile(selIndex); DefaultListModel listModel = (DefaultListModel) jarFileList.getModel(); listModel.removeElementAt(selIndex); }
    private void removeJarButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeJarButtonActionPerformed	// if (jarList.hasCurrentSelection()) {	//   Project project = getCurrentProject();	//   String currSelection = jarList.getCurrentSelection();	//   project.removeJarFile(currSelection);	//   jarList.removeCurrentSelection();	// }    }//GEN-LAST:event_removeJarButtonActionPerformed