SyntaxFix
Write A Post
Hire A Developer
Questions
In the ActionListener Class you can simply add
public void actionPerformed(ActionEvent event) { if (event.getSource()==textField){ textButton.doClick(); } else if (event.getSource()==textButton) { //do something } }