WRT the issue of guns in courtrooms, at shopping malls, at schools, etc.: It's incidents like this that underscore the need for "smart" guns that can only be fired by the owner... the gun needs to be able to determine who's holding it and not fire if the wrong person has it. There are simple systems (such as a magnetic detector, similar to the keycards used to control access to buildings and parking garages) that could be used... for example, the gun owner would wear a ring on his shooting hand which contains embedded circuitry. Proximity to this circuitry would be required in order for the gun to discharge.
The alternative is to turn every courtroom, school, shopping mall, etc. into a fortress, access controlled through metal detectors and with all security armed with tasers, stun guns, and pepper spray.
Oh, and on a personal note: I think they shoulda shot this guy as soon as they caught him, white flag or no.