Synchronize JTextFields Values by PropertyChangeListener

后端 未结 6 1057
盖世英雄少女心
盖世英雄少女心 2020-12-19 18:12

I want to copy the value of a jTextField - TXTFLD1 to another jTextField -TXTFLD2 when the value at TXTFLD1 changes.
I choose propertych

6条回答
  •  醉梦人生
    2020-12-19 18:33

    That's because there's no one firing property change events. Read up on How to Write an Action Listener, although in order to trigger an action event, it is required that you press Enter. Otherwise, you'll need to read up on How to Write a Document Listener.

提交回复
热议问题