FocusEvent doesn't get the last value of JFormattedTextField, How I can get it?
问题 I have two JFormattedTextField objects on my JFrame object. I want a basic Math (addition) by the values of these JFormattedTextField objects. I want it happen when focus lost either the first or the second textfield. But when " focusLost() ", event doesn't get the last value, it gets the previous value. For example; tf1 has 0 and tf2 has 0 at first. I write 2 to tf1 , and when focusLost() , result ( tf1+tf2 ) become still 0. when I change any of them, the result becomes 2 (the previous value