private int updateMail() {
        int res = 0;
        lblError.setVisible(false);
        if (Validate.notOverSize(tfNyMail)) {
            if (Validate.isEmailFormat(tfNyMail.getText())) {
                try {
                    DB.update("update anstalld set mail = '" + tfNyMail.getText() + "' where aid =" + selectedAnstalld);
                    res = 1;
                } catch (InfException e) {
                    e.getMessage();
                }
            } else {
                lblError.setVisible(true);
                lblError.setText("Inte rätt formaterad mail (format: foo@bar.com)");
            }

        } else {
            lblError.setVisible(true);
            lblError.setText("För stor mail adress");
        }
        return res;
    }