I want to subscribe to value changes on a JFormattedTextField.
Checking the source code, the only thing I see is that the property "value" is fired on a new value. But this property is only re开发者_JS百科ferenced there, and directly written, without a constant. If I subscribe to this property change, it works.
However, I'm wondering: is this the correct way to do that?
JavaDoc for JFormattedTextField states[:
Once a JFormattedTextField has been created, you can listen for editing changes by way of adding a PropertyChangeListener and listening for PropertyChangeEvents with the property name value.
That means that you are using the correct way
精彩评论