posted 17 years ago
there are a number of ways
check the textfields to see if either currently has the focus
if(textField1.isFocusOwner())...
else if(textField2.isFocusOwner())...
check the focusManager to get the focused component,
Component currentFocusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
add focusListeners, and set flags when focused