« Return to Thread: TextField not compatible with default button

TextField not compatible with default button

by dcstraw :: Rate this Message:

Reply to Author | View in Thread

The TextField class in scala.swing adds an ActionListener to it's peer JTextField.  This prevents the enter key from activating the default button of the frame.  Since the action listener is added in the constructor, the only workaround I can think of right now is to duplicate the TextField class with my own implementation that does not add the ActionListener to the peer.  Any better ideas?

 « Return to Thread: TextField not compatible with default button