Handling private jtextfields



Hey all. Trying a simple script here, but I have no idea on how to do
this.
I'm trying to create a script like this:

void setValue(String strName, String strText){
[strName].setText(strText);
}

let me explain:
strName should be converted to a JTextField (of course its not done
right there), I mean, I'll send the text field name as a parameter,
and I want to know if there's some function that searches my
components and returns the one with the same name as strName so I can
set its value.

In c#/asp.net I could use a function to search through my
components(foreach control c in page.controls...) , so its another way
to do it, IF I knew how to do this in java.

Is there any way that I can make this work ? Thanks.
.



Relevant Pages