0

hi

I am a beginner. I am building java application which is like a form. First the user fill the whole form and the click OK.
I want to do that as the user clicks OK all the items entered in the JTextField will save in the variables that I declared.

I have do this by ActionListener. I have to press enter every time when I entered anything in JTextField. Like this:

Name=String.format("Set_Id: %s", event.getActionCommand());
Surname=String.format("Set_Id: %s", event.getActionCommand());
DOB=String.format("Set_Id: %s", event.getActionCommand());

Please help how can I do this by using MouseListener. All the values move to variables just by clicking OK.

thanks

Edited by syeda amna: n/a

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by mKorbel
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.