I have a jFormattedTextField and I set setCommitsOnValidEdit to true then I added an event listener to “property change” on “value” property.
At first focus of that jFormattedTextField it doesn’t call event listener method when typing in it. But on “focusLost” it calls event listener and after that when it receives focus again it calls event listener when typing.
I want the event listener be called after any change in any time in that jFormattedTextField (Even in the fist focus).
What’s the problem? How can I fix it?
probably you have to look at DocumentListener example here
EDIT:
I know this issue from my 1st touch of
JFormattedTextField, here comings example that isn’t works at firtsfocusLost🙂 and probably demonstrated your issueminimum limit is there set at
10.000,-for bothJFormattedTextField,1st.
JFormattedTextFieldhandlingFocusListener(output must be delayed intoinvokeLater)2nd.
JFormattedTextFieldhandlingDocumentListener(works every…)inital look
here is same problem, because I put here only 500,- and on focusLost nothing changed, correct amount must be >=
10.000,-on 2dn.
focusLostworks ….no idea how is that possible, but solved by wrapping into
invokeLater(), then works on 1st.focusLost(you have to uncomment these code lines)from code