find focus requester from input verifier
Can anyone tell me how to find out which component is requesting the focus when an InputVerifier for a text field is called?
Basically I'm writing a program using SI units so I have to cope with inputs which are a value + units pair. A text field holds the value and a combo box holds the possible units (like "mW", "W", "kW", "MW"). I only want to verify the input when the text field is exited to somewhere other than its associated combo box. I can't just prevent the combo box causing verification using combo.setVerifyInputWhenFocusTarget(false) because an attempt to move to that combo box from a different text field should fire the verification process for that field.
At the moment I'm contemplating using combo.setVerifyInputWhenFocusTarget(false) when its associated text field gains focus and combo.setVerifyInputWhenFocusTarget(true) when the text field loses focus but this seems inelegant. I'd like to do something inside the input verifier code itself if possible.
Any help will be much appreciated