Press « Text Input « Java Swing Q&A





1. Why must I press Enter TWICE for this JFormattedTextField to activate the JDialog's default button?    stackoverflow.com

In the code sample below, if a user changes the contents of the JFormattedTextField then presses Enter, the dialog is supposed to act as if the OK button is pressed. But ...