Never ever write a Java gui application with the requirement that you check fields before letting the user tab off of them. What a nightmare! Your only two tools, without rewriting large parts of Swing yourself, are FocusListener and InputVerifier. FocusListener is great for the case when you have two such fields. Set up bad data in each field, then watch the focus traversal war as a focusLost() method reclaims the focus for one component, causing focusLost() in the other component to fire. Fun. Then you have InputVerifier, ostensibly designed for this very purpose. Ignoring the fact that buttons still fire without the verifier getting called, now you have the awesomeness of not knowing what the target component would be. Want to build a view with multiple fields that get validated as one? Good luck with that.