Value Change Listener to JTextField

前端 未结 12 2097
情歌与酒
情歌与酒 2020-11-22 04:16

I want the message box to appear immediately after the user changes the value in the textfield. Currently, I need to hit the enter key to get the message box to pop out. Is

12条回答
  •  独厮守ぢ
    2020-11-22 04:21

    Use a KeyListener (which triggers on any key) rather than the ActionListener (which triggers on enter)

提交回复
热议问题