private void txtSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSearchActionPerformed
        DefaultTableModel model=(DefaultTableModel)jTable1.getModel();
        model.getDataVector().removeAllElements();
        tableIndex=0;
        model.fireTableDataChanged();
        
        int key=this.cmbSearchKey.getSelectedIndex();
        String searchString=txtSearch.getText();
        System.out.println(key);
        Statement st=null;
        ResultSet rs=null; 
        String query="";
        switch(key){
            case 0:
                if(searchString.equals("")||searchString==null){
                    query="SELECT pr_id,pr_status,pr_name,pr_tags,pr_description FROM project";
                }
                else{
                    query="SELECT pr_id,pr_status,pr_name,pr_tags,pr_description FROM project WHERE pr_id="+searchString;break;
                }
            case 1:
                query="SELECT pr_id,pr_status,pr_name,pr_tags,pr_description FROM project WHERE pr_name LIKE '%"+searchString+"%'";break;
            case 2:
                query="SELECT pr_id,pr_status,pr_name,pr_tags,pr_description FROM project WHERE pr_description LIKE '%"+searchString+"%'";break;
            case 3:
                query="SELECT pr_id,pr_status,pr_name,pr_tags,pr_description FROM project WHERE pr_tags LIKE '%"+searchString+"%'";break;
            case 4:
                query="SELECT pr_id,pr_status,pr_name,pr_tags,pr_description FROM project WHERE pr_status='Available'";break;
            case 5:
                query="SELECT pr_id,pr_status,pr_name,pr_tags,pr_description FROM project WHERE pr_status='Taken'";break;
            default:break;
        }
        fillTable(query);
    }//GEN-LAST:event_txtSearchActionPerformed