Let $G$ be a non-abelian group with center $Z(G)$, and let $H$ be a maximal subgroup of $G$ which is non-abelian. Is it true that $Z(G)\leq H$?
I am trying to prove that it is true by arguing that if not, then the group $J:=\langle H,Z(G)\rangle$ is going to be a proper subgroup of $G$ containing $H$, which would contradict the maximality of $H$. It is clear that $H$ is a proper subgroup of $J$, but I am not sure how to show that $J$ is a proper subgroup of $G$, i.e that $J\neq G$.
It may be that the statement is not true in general, but in particular I want to prove it when $G=SL(2,q)$.
Any help would be appreciated!
A fairly straightforward example is $H\times C_p$ where $H$ is a non-Abelian simple group and $C_p$ is cyclic of prime order $p$. The centre is $C_p$ and $H$ is maximal.