Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void saveToFile (String fileName)
- {
- for (int row = 0; row < getRows(); row++)
- {
- fileName="";
- for (int column = 0; column < getColumns(); column++)
- {
- Character c;
- c=getCell(row,column).getTypeChar();
- fileName=fileName.concat(c.toString());
- }
- saveFile.add(row,fileName);
- }
- try
- {
- PrintWriter outputFile= new PrintWriter(fileName);
- for(String s:saveFile)
- {
- outputFile.println(s);
- }
- }
- catch(IOException e)
- {
- System.err.println(e);
- }
- finally
- {
- outputFile.close();
- }
- System.out.println("");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement