FileDocCategorySizeDatePackage
Table.javaAPI DocExample4004Mon Apr 06 18:10:26 BST 1998c13.swing

DataModel

public class DataModel extends AbstractTableModel

Fields Summary
Object[]
data
Constructors Summary
DataModel()

    addTableModelListener(new TML());
  
Methods Summary
public intgetColumnCount()

 
    return data[0].length; 
  
public intgetRowCount()

 
    return data.length;
  
public java.lang.ObjectgetValueAt(int row, int col)

 
    return data[row][col]; 
  
public booleanisCellEditable(int row, int col)

 
    return true; 
  
public voidsetValueAt(java.lang.Object val, int row, int col)

    data[row][col] = val;
    // Indicate the change has happened:
    fireTableDataChanged();