 private int obterValorId() {
        String sql="select max(id) from Cliente";
        PreparedStatement pst2;
        try {
            pst2 = conexao.prepareStatement(sql);
            ResultSet rs = pst2.executeQuery();
            if(rs.next()) {
                int valor = rs.getInt(1);
                return valor;
            } else {
                return 1;
            }
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
        return 0;
    }