I'm Building a Client/Server application. and I want to to make it easy for the user at the Authentication Frame.
I want to know how to make enter-key submits the login and password to the Database (Fires the Action) ?
I'm Building a Client/Server application. and I want to to make it easy for the user at the Authentication Frame.
I want to know how to make enter-key submits the login and password to the Database (Fires the Action) ?
One convenient approach relies on
setDefaultButton()
, shown in this example and mentioned in How to Use Key Bindings.Add an
ActionListener
to the password field component:The code below produces this screenshot: