I have a method that creates new TextFields in a gridPane (2x8). I was wondering, once they are created, how do I access the information within each index (as in: 0,0 - 1,0, etc).
Here's the code:
private void llenarGridJugadores(ArrayList<NodoJugadores> array)
{
if( (array.get(0).getCategoria() == 3) && (array.get(0).getSexo().equalsIgnoreCase("m")) )
{
for(int i = 0 ; i < array.size() ; i++)
{
TextField text = new TextField(array.get(i).getNombre());
grid.add(text, i, 0);
}
}
else if( (array.get(0).getCategoria() == 3) && (array.get(0).getSexo().equalsIgnoreCase("f")) )
{
for(int i = 0 ; i < array.size() ; i++)
{
TextField text = new TextField(array.get(i).getNombre());
grid.add(text, 1, i);
}
And here's what I'm trying to do:
public ArrayList<NodoJugadores> retornarGridJugadores(ArrayList<NodoJugadores> array, NodoCategorias aux)
{
if( (aux.getNumCategoria() == 3) && (aux.getSexo().equalsIgnoreCase("m")) )
{
for(int i = 0 ; i < array.size() ; i++)
{
array.get(i).setNombre(grid.getChildren().get(i).getAccessibleText());
}
}
}