I am saving a .txt and .doc file containing the data from my JTable. At the minute when it saves it lays the text out like its in a table, but due to different lengths of da
The algorithm is quite simple:
for (int row = 0; row < table.getRowCount(); row++) { for (int col = 0; col < table.getColumnCount(); col++) { os.print(table.getColumnName(col)); os.print(": "); os.println(table.getValueAt(row, col)); } }