private void hideOrShowComponentsBasedOnRole() {
        //components for the roles
        Component[] adminComps = {lblEditPassword, lblPassword, tfPassword, lblAdminUsername};
        Component[] plComps = {lblLeadProjects, lblEditLead, leadHolderScroll, leadHolder};
        Component[] spComps = {anstalldShowHolderKompetens, anstalldShowSpelprojectHolder, spelprojektHolderScroll, kompetensHolderScroll, lblSpelprojekt, lblKomp, lbllKompetensUpdate, lblSpelprojektUpdate};
        if (!cbAdministrator.isSelected()) {
            for (Component c : adminComps) {
                c.setVisible(false);
            }
        } else {
            for (Component c : adminComps) {
                c.setVisible(true);
            }
        }
        if (!cbProjektledare.isSelected()) {
            for (Component c : plComps) {
                c.setVisible(false);
            }
        } else {
            for (Component c : plComps) {
                c.setVisible(true);
            }
        }
        if (!cbSpecialist.isSelected()) {
            for (Component c : spComps) {
                c.setVisible(false);
            }
        } else {
            for (Component c : spComps) {
                c.setVisible(true);
            }
        }
    }