import javax.swing.table.*; import java.util.*; class ArvuTabeliMudel extends AbstractTableModel{ Hashtable hoidla=new Hashtable(); public int getRowCount(){ return 10; } public int getColumnCount(){ return 10; } public Object getValueAt(int rida, int veerg){ String voti=rida+","+veerg; if(hoidla.containsKey(voti)){ return hoidla.get(voti); } return "Rida "+rida+", veerg "+veerg; } public boolean isCellEditable(int rida, int veerg){ return true; } public void setValueAt(Object uus, int rida, int veerg){ System.out.println("Reale "+rida+", veerule "+veerg+" kirjutati "+uus); hoidla.put(rida+","+veerg, uus); } }