• Post Reply Bookmark Topic Watch Topic
  • New Topic

Action Listeners and JTextField  RSS feed

 
Alix Ollivier
Ranch Hand
Posts: 71
Java Linux Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to build my first GUI, and I wanted to gather input using a JTextField. I have 5 JTextFields that I want to use to gather input, then I want to paste their sum into a non-editable JTextField. I looked online, and found that I have to use an ActionListener. However, I have no clue how that works, and the Oracle website uses tough terminology. Can someone please explain what ActionListener does and how to implement it? Thanks.
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a whole section in the java tutorials about EventListeners (an ActionListener is a specialised type of EventListener). It would be better if you read that and then asked specific questions about what you don't understand rather than expect somebody to just repeat everything that is in there.
 
Alix Ollivier
Ranch Hand
Posts: 71
Java Linux Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah. Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!