What you have just witnessed if it comes on top of the window is a kernel panic. A kernel panic can happen because:
1. The hard drive directory pointing to kernel extensions has gotten corrupted and needs repair. This may happen after running a hard disk utility that is not aware of the current directory structure, and sadly, Norton Utilities and Systemworks is not. Alsoft Disk Warrior is currently the only directory program known to properly repair Mac OS X systems. This may also happen after improperly shutting down the computer (i.e. not using the Apple menu's shut down). If you get a spinning beachball in Mac OS X, don't panic, and don't restart the machine. Attempt first to force quit any offending application. Usually that will resolve the issue giving you a chance to properly shut down your computer. Force quiting an application may be done by either command-option-escape key sequence, or Option key held down as you select the application in the Dock by clicking on it once and selecting Force Quit from the menu that pops next to the Dock on that application. A freeware called escape pod will force quit the frontmost applications with a simple control-command-delete key combination if it is running. Other tips for avoiding spinning beachball issues may be found here: http://www.macmaps.com/Macosxspeed.html
2. Hardware attached to the computer does not meet the specifications found in the kernel extensions and the hardware did not get updated drivers installed. Be sure all your attached hardware has the latest drivers and attempt to isolate the hardware that is attached to see which one is tripping up the kernel. Mac OS X 10.2.5 was known to cause kernel panics with some USB hubs that were out of spec, and upgrading to Mac OS X 10.2.6 fixes the problem.
3. Memory - one cause of a kernel panic is bad memory. You may have found no issue with bad memory under Mac OS 9, but any memory out of spec in Mac OS X is liable to cause a kernel panic under tough enough conditions. Speak to the vendor that you got your extra memory from and see if they are willing to help you get it replaced. Be sure to follow: Apple specs
4. Motherboard - rare, but it can happen, a motherboard chip may have failed and if your machine comes with a Hardware Test CD it should be able to detect it. If replacing the RAM using Customer Installable Parts database as a guide or through an authorized service center does not help, take the machine to a service center and tell them what you went through to try to isolate the problem, and they may recommend a motherboard replacement.
Additional kernel panic tips can be found here.