Let $R$ be a commutative ring with 1. If every maximal ideal of $R$ is principal, is $R$ a principal ideal ring?
The link gap between principal maximal ideals and principal ideal rings is bridged by two theorems (and their combination):
Since there can be more prime ideals than just the maximal ideals, you can see that $R$ has a chance to fail if only its maximal ideals are principal.
Two references to examples appear at this MO post: http://mathoverflow.net/questions/30715/a-remark-on-cohens-theorem . I wouldn't be able to fit in a full example any better than they could, so I hope the references are sufficient. (Beyond the reference in the accepted solution, there is a solution in the comments that might suit you better, depending on your background. To be clear, they have principal maximal ideals, but they aren't Noetherian and hence not principal ideal rings. )
For a proof of Kaplansky's theorem, you may as well look at the original paper which is free to view online. (Theorem 12.3)