Why does Ubuntu freeze when I close the laptop?

view story

http://askubuntu.com – If I'm working on Windows 7 and close the laptop, it logs me out, and when I open it again I can log back in. However, if I close the laptop with Ubuntu running, the screen goes black and it freezes, why? I am running the latest version of Ubuntu. Update Problem solved, i got the answer from ubuntu forums, I had to go to the power settings and choose "do nothing" when the lid is closed (HowTos)