Qualcuno potrebbe darmi qualche dritta su quale algoritmo utilizzare?
Questo è il metodo che avevo cominciato a scrivere. E' la strada giusta?
Graziecodice:public void writeTable() { for (int row = 0; row <= main.getJTable().getRowCount(); row++) { for (int col = 0; col <= main.getJTable().getColumnCount(); col++) { String find = (String) main.getJTable().getModel().getValueAt(row, 10).toString(); if (find.equals("testoDaCercare")) { index = row; for (int i = 0; i < this.getTable().getRowCount(); i++) { if (this.getTable().getValueAt(i, 0) == null) { index1 = i; } } //main.getJTable() è il riferimento alla tabella origine del primo frame this.getTable().setValueAt(main.getJTable().getValueAt(index, 0), index1, 0); this.getTable().setValueAt(main.getJTable().getValueAt(index, 1), index1, 1); this.getTable().setValueAt(main.getJTable().getValueAt(index, 2), index1, 2); this.getTable().setValueAt(main.getJTable().getValueAt(index, 3), index1, 3);

Rispondi quotando
