Posted By:
Les_Jones
Posted On:
Wednesday, June 5, 2002 08:22 AM
Firstly, in future can you include code include the tags
.... code here ...
so that it is readable.
Ok, what specifically is the error? ArrayIndexOutOfBoundsException per chance?
Also, you say you create the GridServ object and then call setGrid. Surely, with the code you have, you need to call setSize first, otherwise your setGrid will do nothing!
As an aside, why are you creating an array of size [50][50]? Why are you not allocating it to the right size when you know what the size should be?
Finally, why use the code :
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outGrid, false)));
when this does the same job?
BufferedWriter out = new BufferedWriter(new FileWriter(outGrid, false));