开发者

What is the "good way" to subscribe to value changes in a JFormattedTextField?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜