code: private void btDeleteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btDeleteActionPerformed
      {//GEN-HEADEREND:event_btDeleteActionPerformed
  
        int row = tableList.getSelectedRow();
        int col = tableModel.findColumn("id");
  
        if(row > -1 && col > -1)
        {
          Object value = tableModel.getValueAt(row, col);
          final LinkedList<Long> corpusListToDelete = new LinkedList<Long>();
          long l = Long.parseLong(value.toString());
          corpusListToDelete.add(l);
  
          pbDelete.setIndeterminate(true);
          btClose.setEnabled(false);
          btDelete.setEnabled(false);
  
          SwingWorker<String, Void> worker = new SwingWorker<String, Void>()
          {
  
            @Override
            protected String doInBackground() throws Exception
            {
              corpusAdmin.deleteCorpora(corpusListToDelete);
              updateTable();
              return "";
            }
  
            @Override
            protected void done()
            {
              pbDelete.setIndeterminate(false);
              pbDelete.setValue(100);
              btClose.setEnabled(true);
              btDelete.setEnabled(true);
            }
          };
  
          worker.execute();
  
        }
  
      }
docs: GEN-LAST:event_btCloseActionPerformed