private void updatePassword() {
        lblError.setVisible(false);
        switch (lblEditPassword.getText()) {
            case "Klar/uppdatera":
                if (!Validate.tfEmpty(tfPassword) && Validate.notOverSize(tfPassword)) {
                    try {
                        String query = "Update administrator set losenord='" + tfPassword.getText() + "' where aid=" + selectedAnstalld;
                        DB.update(query);
                    } catch (InfException e) {
                        e.getMessage();
                    }
                    tfPassword.setEnabled(false);
                    lblEditPassword.setText("Ändra");
                } else {
                    lblError.setVisible(true);
                    lblError.setText("Fyll i ett lösenord");
                }
                break;
            case "Ändra":
                tfPassword.setEnabled(true);
                lblEditPassword.setText("Klar/uppdatera");
                break;
        }
    }