I have a Question. I created a Swing GUI Form. This form contain JTextFields, JComboBox components.
Now what i want to do, when user pressing completed button i want to validate JTextFields and JComboBox component. I want to write common method for all JTextFields and another common method for JComboBoxes. Does anyone know about validate API?
I dont need to validate all fields one by one.
If “validation” means “check all the fields” … then, yes – your “validate” routine will check all the fields one-by-one 🙂
You can also “validate-as-you-go”. There are many ways to accomplish this, including:
Kenai Simple Validation API
InputVerifier
http://www.java2s.com/Code/Java/Swing-Components/InputVerifierExample.htm