private void jobTitleItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jobTitleItemStateChanged
        if(checker){
            String jobT = (String)jobTitle.getSelectedItem();
            String sql = null;
            ResultSet rs = null;
            Iterator<String> it = null;
            switch (jobT) {
                case "MF Regional Head":
                    supervisorField.removeAllItems();
                    supervisorField.addItem("");
                    jLabel1.setEnabled(false);
                    jLabel6.setEnabled(true);
                    jLabel12.setEnabled(false);
                    jLabel26.setEnabled(false);
                    jLabel6.setForeground(Color.red);
                    jLabel12.setForeground(Color.black);
                    jLabel26.setForeground(Color.black);
                    supervisorField.setEnabled(false);
                    region.setEnabled(true);
                    area.setEnabled(false);
                    branch.setEnabled(false);
                    region.setText("");
                    area.setText("");
                    initBranchAssField();
                    branch.setSelectedItem("");
                    break;
                case "MF Manager":
                    supervisorField.removeAllItems();
                    supervisorField.addItem("");
                    jLabel1.setEnabled(false);
                    jLabel6.setEnabled(true);
                    jLabel12.setEnabled(true);
                    jLabel26.setEnabled(false);
                    jLabel6.setForeground(Color.red);
                    jLabel12.setForeground(Color.red);
                    jLabel26.setForeground(Color.black);
                    supervisorField.setEnabled(false);
                    region.setEnabled(true);
                    area.setEnabled(true);
                    branch.setEnabled(false);
                    region.setText("");
                    area.setText("");
                    initBranchAssField();
                    branch.setSelectedItem("");
                    break;
                case "ASAP Supervisor":
                    supervisorField.removeAllItems();
                    supervisorField.addItem("");
                    jLabel1.setEnabled(false);
                    jLabel6.setEnabled(true);
                    jLabel12.setEnabled(true);
                    jLabel26.setEnabled(true);
                    jLabel6.setForeground(Color.red);
                    jLabel12.setForeground(Color.red);
                    jLabel26.setForeground(Color.red);
                    supervisorField.setEnabled(false);
                    region.setEnabled(true);
                    area.setEnabled(true);
                    branch.setEnabled(true);
                    region.setText("");
                    area.setText("");
                    initBranchAssField();
                    branch.setSelectedItem("");
                    break;
                case "MFU Supervisor":
                    supervisorField.removeAllItems();
                    supervisorField.addItem("");
                    jLabel1.setEnabled(false);
                    jLabel6.setEnabled(true);
                    jLabel12.setEnabled(true);
                    jLabel26.setEnabled(true);
                    jLabel6.setForeground(Color.red);
                    jLabel12.setForeground(Color.red);
                    jLabel26.setForeground(Color.red);
                    supervisorField.setEnabled(false);
                    region.setEnabled(true);
                    area.setEnabled(true);
                    branch.setEnabled(true);
                    region.setText("");
                    area.setText("");
                    initBranchAssField();
                    branch.setSelectedItem("");
                    break;
                case "TMP Supervisor":
                    supervisorField.removeAllItems();
                    supervisorField.addItem("");
                    jLabel1.setEnabled(false);
                    jLabel6.setEnabled(true);
                    jLabel12.setEnabled(true);
                    jLabel26.setEnabled(true);
                    jLabel6.setForeground(Color.red);
                    jLabel12.setForeground(Color.red);
                    jLabel26.setForeground(Color.red);
                    supervisorField.setEnabled(false);
                    region.setEnabled(true);
                    area.setEnabled(true);
                    branch.setEnabled(true);
                    region.setText("");
                    area.setText("");
                    initBranchAssField();
                    branch.setSelectedItem("");
                    break;
                case "AO/Individual Lending Staff":
                    
                    jLabel1.setEnabled(true);
                    jLabel6.setEnabled(true);
                    jLabel12.setEnabled(true);
                    jLabel26.setEnabled(true);
                    jLabel6.setForeground(Color.red);
                    jLabel12.setForeground(Color.red);
                    jLabel26.setForeground(Color.red);
                    supervisorField.setEnabled(true);
                    region.setEnabled(true);
                    area.setEnabled(true);
                    branch.setEnabled(true);
                    region.setText("");
                    area.setText("");
                    initBranchAssField();
                    branch.setSelectedItem("");
                    break;
                case "PO/Group Lending Staff":
                    supervisorField.removeAllItems();
                    supervisorField.addItem("");
                    try{
                        sql = "select empNo, fName, lName from Employee where jobTitle = 'MFU Supervisor' and empStatus != 'Terminated'";
                        conn = DBConnect.connect();
                        pst = conn.prepareStatement(sql);
                        rs= pst.executeQuery();
                        while(rs.next()){
                            supervisorField.addItem(rs.getString("fName") + " " + rs.getString("lName"));
                            emplNo.add(rs.getString("empNO"));
                        }
                    }
                    catch(Exception e){
                        JOptionPane.showMessageDialog(null, e);
                    }
                    finally{
                        if(pst != null){
                            try{
                                pst.close();
                            }
                            catch(SQLException ex){
                                JOptionPane.showMessageDialog(null, ex);
                            }
                        }
                        if(rs != null){
                            try{
                                rs.close();
                            }
                            catch(SQLException ex){
                                JOptionPane.showMessageDialog(null, ex);
                            }
                        }
                        if(conn != null){
                            try{
                                conn.close();
                            }
                            catch(SQLException ex){
                                JOptionPane.showMessageDialog(null, ex);
                            }
                        }
                    }
                    jLabel1.setEnabled(true);
                    jLabel6.setEnabled(true);
                    jLabel12.setEnabled(true);
                    jLabel26.setEnabled(true);
                    jLabel6.setForeground(Color.red);
                    jLabel12.setForeground(Color.red);
                    jLabel26.setForeground(Color.red);
                    supervisorField.setEnabled(true);
                    region.setEnabled(true);
                    area.setEnabled(true);
                    branch.setEnabled(true);
                    region.setText("");
                    area.setText("");
                    initBranchAssField();
                    branch.setSelectedItem("");
                    break;
                case "APO/TMP Lending Staff":
                    supervisorField.removeAllItems();
                    supervisorField.addItem("");
                    try{
                        sql = "select empNo, fName, lName from Employee where jobTitle = 'TMP Supervisor' and empStatus != 'Terminated'";
                        conn = DBConnect.connect();
                        pst = conn.prepareStatement(sql);
                        rs= pst.executeQuery();
                        while(rs.next()){
                            supervisorField.addItem(rs.getString("fName") + " " + rs.getString("lName"));
                            emplNo.add(rs.getString("empNO"));
                        }
                    }
                    catch(Exception e){
                        JOptionPane.showMessageDialog(null, e);
                    }
                    finally{
                        if(pst != null){
                            try{
                                pst.close();
                            }
                            catch(SQLException ex){
                                JOptionPane.showMessageDialog(null, ex);
                            }
                        }
                        if(rs != null){
                            try{
                                rs.close();
                            }
                            catch(SQLException ex){
                                JOptionPane.showMessageDialog(null, ex);
                            }
                        }
                        if(conn != null){
                            try{
                                conn.close();
                            }
                            catch(SQLException ex){
                                JOptionPane.showMessageDialog(null, ex);
                            }
                        }
                    }
                    jLabel1.setEnabled(true);
                    jLabel6.setEnabled(true);
                    jLabel12.setEnabled(true);
                    jLabel26.setEnabled(true);
                    jLabel6.setForeground(Color.red);
                    jLabel12.setForeground(Color.red);
                    jLabel26.setForeground(Color.red);
                    supervisorField.setEnabled(true);
                    region.setEnabled(true);
                    area.setEnabled(true);
                    branch.setEnabled(true);
                    region.setText("");
                    area.setText("");
                    initBranchAssField();
                    branch.setSelectedItem("");
                    break;
                default:
                    supervisorField.removeAllItems();
                    supervisorField.addItem("");
                    jLabel1.setEnabled(false);
                    jLabel6.setEnabled(false);
                    jLabel12.setEnabled(false);
                    jLabel26.setEnabled(false);
                    jLabel6.setForeground(Color.black);
                    jLabel12.setForeground(Color.black);
                    jLabel26.setForeground(Color.black);
                    supervisorField.setEnabled(false);
                    region.setEnabled(false);
                    area.setEnabled(false);
                    branch.setEnabled(false);
                    region.setText("");
                    area.setText("");
                    initBranchAssField();
                    branch.setSelectedItem("");
                    break;
            }
        } 
    }