Center of Lie group and Lie algebra

This is an answer for $G$ connected.

Okay, for $Y\in \frak{g}$, you can show that the flow on $G$ given by the vector field, $Y$, is given by multiplication by elements of $e^{tY}, (t\in \mathbb{R})$. If $X\neq 0$, is in the center, then its flow commutes with the flow associated to all other members of $\frak{g}$ i.e. $e^{tX}$ commutes with $e^{tY}$ for all $Y\in \frak{g}$. The set $\{e^{tY}: t\in \mathbb{R}, Y\in \frak{g}\}$ contains an open neighborhood of the identity, so it generates $G$, since $G$ is connected. So $e^{tY}$ commutes with a subset that generates $G$, hence it commutes with all elements of $G$. Hence $e^{tY}$ is in the center of $G$. So $Z(G)$ contains a one-dimensional sub manifold, hence is not zero-dimensional.

I realize this probably uses more Lie-group theory than you had hoped, and maybe theres a more elementary way to do it, but i don't immediately see it.

Edit :Maybe there's an easier way to see that $X\in Z(\frak{g})$ implies $e^{tX}\in Z(G)$: Let $\gamma: \mathbb{R}\rightarrow \mathfrak{g}, t\mapsto L_{e^{tY}\ast} \circ R_{e^{-tY}\ast }(X_e)$. Then prove that $\gamma'(0)=[X,Y]$ (this requires the interpretation of the bracket as the Lie derivative). So if $X$ is in the center, then $\gamma'(s)= L_{e^{sY}_\ast }\circ R_{e^{-sY}_\ast }(0)=0$ (since $ L_{e^{(s+t)Y}\ast}= L_{e^{sY} \ast} \circ L_{e^{tY} \ast}$ and likewise for $X$). But this implies $\gamma = X_e$ is constant. So $e^{tY}e^{uX}e^{-tY} = e^{uX}$ for all $t, u\in \mathbb{R}$, which says all $e^{uX}$ commute with all $e^{tY}$