[b][red]This message was edited by Darkstorm at 2002-10-21 14:23:11[/red][/b][hr]
I am currently writting a program, that packs a number of boxes, with the sizes read from a text file and the size of the board where the boxes are to be put in is also read from the text file. On the board, the boxes's position as which will be put first are randomly choosen.
The first problem is I don't know whether my program is reading from the file or not.
Secondly I don't know how to draw the boxes out after it is placed on the board.
Below are my code. Thanks a lot for your time and help.
(Code for reading from file text)
BufferedReader in = new BufferedReader(new FileReader(file));
while ((line = in.readLine()) !=null)
totalBoxes = Integer.parseInt(line);
StringTokenizer st=new StringTokenizer(line);
boardColumn=originalBoardCol * 2;
for(int i=0; i<totalBoxes; i++)
//StringTokenizer st=new StringTokenizer(line);
} //while close bracket
catch (IOException e)