1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
public class MyModel extends AbstractTableModel {
Object donnees[][];
String titres[];
public MyModel(Object donnees[][], String titres[]) {
this.donnees = donnees;
this.titres = titres;
}
public int getColumnCount() {
return donnees[0].length;
}
public Object getValueAt(int parm1, int parm2) {
return donnees[parm1][parm2];
}
public int getRowCount() {
return donnees.length;
}
public String getColumnName(int col){
return titres[col];
}
public isCellEditable(int row, int col){
return false;
}
} |
Partager