arrays - How to dynamically access textfields in Java? -


we have little problem accessing textfield-s.

we have list of 81 (yes 81) textfields

private textfield textfield1 = new textfield();  private textfield textfield2 = new textfield();  private textfield textfield3 = new textfield();  ... 

now want text these fields , store them in array.

for loop    data[i] = textfield???.gettext(); 

how incorporate changing number i field name?

would appreciate or ideas.

the easiest way add textfield objects arraylist , loop through list calling gettext() on each field.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -