How do I make text typed in a TextArea appear in uppercase only?

The key to solving this problem is to subclass TextArea and intercept
any KeyEvent sent. You need to check to see if the typed
key is a lower case character (be careful to keep this independent of
Locale!) - if it is, change it to upper case.