I have Vector named "datas". Vector looks like;
[1000, 3, 676767, true]
And i have jTextField named "p3_1000"
I write below code for set this text field as invisible or visible.
for(int i = 0; i<= datas.size(); i++){
if(datas.elementAt(i).elementAt(3).equals("true")){
???
}
System.out.println("p"+(datas.elementAt(i).elementAt(1))+"_"+(datas.elementAt(i).elementAt(0)));
}
Print Line show correct format "p3_1000" as like my textfield name. But i dont find a ways set releated textfield call with its name. How i write this code for automaticly detect true textfield ?
I must say if 3th index of current vector row is "true" set visible textfield named "p"+(datas.elementAt(i).elementAt(1))+"_"+(datas.elementAt(i).elementAt(0))
But how?
Can we call any object with its name using any string referance ?