I have a jFormattedTextField in my program and I need to update a jLabel’s text when jFormattedTextField value has been changed validly.
Actually jFormattedTextField gets a number and jLabel displays diffrence between this number and another number.
I currently do this by listenning to “FocusLost” event of jFormatted text.
How can i do this?
register a PropertyChangeListener for the property “value” to the formattedField
Do not use DocumentListener nor FocusListener: the former is notified too often (on every keytyped, before parsing happened) the latter is too brittle.