Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Change Listener on jTextField  RSS feed

 
David Hittel
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have a question. I want to change get a Listener thats reacts, when i change the Numbers/Text from the jTextField and when i select a diffrent thing in the ComboBox.

What is the right right Listener for that?

Thanks

David
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JTextField - DocumentListener
JComboBox - ItemListener, ActionListener, others - read the api docs to see
which is best for your circumstances.
Look in methods and methods inherited from.... for add...Listener,
to see what listeners you can add, and what they do.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!