Using Swing's JFormattedTextField for integers is not as trivial as it should be.