Java Swing Form Validation

java_swing_validation
Ever needed to verify your text fields and/or text areas that the input is in correct form?
Well, I did. As a matter of fact, where I work right now demanded me to provide verification for the project we were working for.
I searched for any reliable verification libraries for Java, and in fact I found a few, most popular being from JGoodies but due to requirements I ended up writing my own using the way provided here. Then again, that way was not enough, lacking in a few ways, making me improvise on it, and here it is.

For anyone interested, it’s on my BitBucket account. I think code is very simple, and the Test class I provided gives a very clear idea as how to use it, or how to implement new validation ways. In any case, I will probably provide new examples and step by step implementation of a new verifier. All in all, I relied on the native method setInputVerifier( new myCustomInputVerifier()); so it is pretty convenient to use. Where I work will use this library (not as it is though) in our other project, so I guess it will be useful to some of you.


No Response

Leave us a comment


No comment posted yet.

Leave a Reply