I have a JTextField with an ActionListener registered to it. When this JTextField has focus, and the enter key is pressed, an ActionEvent is created.
How can I link this event to another components ActionListener, like a JButton, so I can run its code?
Have each action listener just call the same function. For example,
public void actionPerformed( ActionEvent e ) {
myModel.actOnButtonOrTextEvent( e );
}