Access an object by its name as string

From: Wiz (wiz_at_near.it)
Date: 12/22/03


Date: Mon, 22 Dec 2003 12:23:55 +0100

Hi there,
I have some JTextField objects, called jtf0, jtf1, jtf2, and so on.
How I can access their properties by their names known as string? For
instance:

for(int i=0; i<10; i++) {
  function_to_get_a_reference("jtf" + i).setText("hello " + i);
}

Does a function like this exist? With other languages I'd use the eval()
function, but I couldn't fint it in Java.
Thanks in advance to everyone can help me.
Bye

Marco

ps: sorry for my bad english..