how to set value of text box using java function

Hello Experts 

is it possiable to set a value of an attributes of one of form control in FD by using Java function 

for example .

i need to change a text of a text filed by call a java function that will select some thing from table based the contact name in the this record 

it this possiable ?


thanks in advacnce