private void btnSearchEmpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchEmpActionPerformed
         try{
            int key=jComboBox1.getSelectedIndex();
            
            String search=txtSearchEmp.getText();
            String query2="";
            switch(key){
                case 0:
                    if(search==null||search.equals("")){
                        query2="SELECT emp_id,emp_name,emp_address,emp_hiring_date FROM employee";
                    }
                    else{
                        query2="select emp_id,emp_name,emp_address,emp_hiring_date from employee where emp_id="+search;
                    }
                    break;
                case 1:
                    query2="select emp_id,emp_name,emp_address,emp_hiring_date from employee where emp_name like '%"+search+"%'";
                    break;
                case 2:
                    query2="select emp_id,emp_name,emp_address,emp_hiring_date from employee where emp_address like '%"+search+"%'";
                    break;
                case 3:
                    query2="select emp_id,emp_name,emp_address,emp_hiring_date from employee where emp_hiring_date like '%"+search+"%'";
                    break;
            
            }
            fillTable(query2);
            
                
            
        }
        catch(Exception ex){
            JOptionPane.showMessageDialog(null, "No employees found according to the search!", "No employees found", JOptionPane.ERROR_MESSAGE);
            System.out.println("Exception captured : "+ex.getMessage());
        }
    }//GEN-LAST:event_btnSearchEmpActionPerformed