Restricting JTextField input

Hello,

New to swing programing, and I want to restrict the type of input accepted in a JTextField. For example, I want to only allow numeric characters. I tried changing the value on a caret event, but quickly realized that is not a good thing.

Any suggestions?

Thanks

evster

[306 byte] By [evster07a] at [2007-11-26 16:00:33]
# 1
See JFormattedTextField
tjacobs01a at 2007-7-8 22:21:58 > top of Java-index,Desktop,Core GUI APIs...