Opposite component in Input verifier

Hi all,

I have built a component with two TextFields. There are some validations involved with these text fields.

1. Each of these text fields have a min/max value and the value should be within the range given. For this validation i have used an InputVerifier. By the input verifier it validates whether the given value in the text box is within the range each time it looses focus through the inputverifier.

2. second validation is when the focus is moved out of this component the component should be validated to see whether a field out of the 2 is empty, if either is empty when one has a value then it should give an error message and focus on to the field which is blank.

These two validation mechanisms works independently, but when they are put together there is a small problem, when you insert an invalid value out of the range to the first box and move to the second field the message box which indicates that the field is out of range appears and because of this reason it validates the components according to the second validation because now the focus moves out of the component. i need to stop this from happening, any suggestions on this?

Thank you,

Charith

[1220 byte] By [charithifa] at [2007-11-27 9:14:03]
# 1
the solution that i have in mind is to get the opposite component from inside the input verifier so that i could both validations within the input verifier it self.....
charithifa at 2007-7-12 22:01:56 > top of Java-index,Desktop,Core GUI APIs...
# 2
if you have min/max/range values, why don't you use JSpinners?
Michael_Dunna at 2007-7-12 22:01:56 > top of Java-index,Desktop,Core GUI APIs...