suppose you have one text box name firstField and a button name getValue
now you want the value from the textfiled on click
than you have to implement the actionListener interface so that you will get the button click event
method will look like this
and do this what i did to get the value form the textfield
1
2
and if you want to save it in a variable than do this
make a
string variable name saveValue
may be this is your problem's answer