Not an SSCCE....where is the addActionListeners method defined? Are you required to use the class ConsoleProgram (it is a 3rd party library, and IMO for beginners it defeats the process of learning...
Type: Posts; User: copeg
Not an SSCCE....where is the addActionListeners method defined? Are you required to use the class ConsoleProgram (it is a 3rd party library, and IMO for beginners it defeats the process of learning...
Short, Self Contained, Correct Example - see the link in my signature, or just google the acronym.
You call a method addActionListeners(), and did not post the code. We can only guess what...
Post an SSCCE that demonstrates the behavior. And make sure you have added the ActionListener to the JTextField.
Assuming you've added the ActionListener to the JTextField, the JTextField must have focus to fire the event. Focus occurs when you type inside, or by calling requestFocus