private void btnTDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnTDeleteActionPerformed
        // TODO add your handling code here:
        int tid = Integer.parseInt(lblTestID.getText());
        if (tid<=0)
            return;
        String msg = "You are about to delete test #"+String.valueOf(tid)+". \r\nDo you wish to continue?";
        int x = JOptionPane.showConfirmDialog(this, msg, "Do you wish to continue?",JOptionPane.YES_NO_OPTION);
        if (x!=0)
            return;
        Test_Controller TC = new Test_Controller("localhost", DBName, DBAccount, DBPwd);
        boolean flag = TC.DeleteTest(tid);
        if(!flag)
        {
            tbxError.setText(TC.err);
            return;
        }
        String key = tbxTSearch.getText().trim().replace("'", "");
        int Method  = cbxTSearchType.getSelectedIndex();
        SearchTests(Method, key);  
        tbxError.setText("Deletion successful.");
    }