posted 14 years ago
In this code
For each value of i and j, you're creating a whole new 2-dimensional array, and putting a TextField into one element. The next time around the loop, you create another new array, discarding the first one, and put a TextField into a different element; etc. You get NullPointerExceptions because the end result is an array which contains just one TextField (the very last one) and a lot of nulls.
Just remove that "t=new TextField[n][n];" line. You create the array when the member variable is declared, so you don't need to create it again!>