Firstly, as Rob says, you need to cast the result of e.getSource() to a JFormattedTextField before you can use methods that belong to that class:
Secondly, check out the
Javadocs for JFormattedTextField.
REVERT is a constant, and the documentation says "see Also:
setFocusLostBehavior(int)". So it looks like that's relevant.
(The docs also have an example on how to do input validation, which might be helpful)