W
Wiz
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..
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..