Roel De Nijs wrote:I used a javax.swing.text.DocumentFilter with a regex to check.
K. Tsang wrote:What I did was use a DocumentListener on the JTextField and use regex to check.
Both are very good. DocumentFilter is better. But, I think that is very sophisticated to this Sun system!
I would prefer something more simple. Like this:
Yes, I know that way, we can't prevent copy and past. But, this don't matter for a simple system.
Cheers,
Johnny Barbosa
SCJA, SCJP, SCWCD, SCJD(Story | Relato), SCBCD (coming soon)