diff --git a/java/examples/Topics/Advanced Data/LoadSaveTable/LoadSaveTable.pde b/java/examples/Topics/Advanced Data/LoadSaveTable/LoadSaveTable.pde index 2e3f2a20e..e8fcc64ae 100644 --- a/java/examples/Topics/Advanced Data/LoadSaveTable/LoadSaveTable.pde +++ b/java/examples/Topics/Advanced Data/LoadSaveTable/LoadSaveTable.pde @@ -69,6 +69,12 @@ void mousePressed() { row.setFloat("y", mouseY); row.setFloat("diameter", random(40, 80)); row.setString("name", "Blah"); + + // If the table has more than 10 rows + if (table.getRowCount() > 10) { + // Delete the oldest row + table.removeRow(0); + } // Writing the CSV back to the same file saveTable(table,"data/data.csv");