I want to add text fields a01, a02, ...
to the array a
.
I want to display the value of val
so that I would know if the text is being taken from text fields. This code does not show any errors, but, well, it doesn't give me output as well.
int i, j;
JTextField[][] a = new JTextField[9][9];
int[][] val = new int[9][9];
for (i = 0; i < 9; i++)
{
for (j = 0; j < 9; j++)
{
val[i][j] = Integer.parseInt(a[i][j].getText());
System.out.println(val[i][j]);
}
}
It is from my old question here.