How to set textfield in panel with values entered by a user in dlgbox?



I have a textfield, textfield1 in a panel. The user clicks on a button
that opens a dialog box and enters values into another textfield,
textfield2. The user closes the dialog box. How can I get the value
from textfield2 into textfield1?

Thank you,

.