import java.util.Hashtable; import java.util.Vector; import javax.swing.table.*; public class StatTableModel extends RefreshAbstractTableModel { Hashtable statInfos; String columns[]={"Variable","Value"}; DonkeyCore donkeyCore; public StatTableModel(Hashtable statInfos) { this.statInfos=statInfos; } public int getColumnCount() { return columns.length; } public String getColumnName(int col) { return columns[col]; } public int getRowCount() { return statInfos.size(); } public Object getValueAt(int row,int col) { if (col==0) return statInfos.keySet().toArray()[row]; return statInfos.values().toArray()[row]; //return ((Vector)statInfos.values().toArray()[row]).get(col-1); } public boolean isCellEditable(int row,int col) { return false; } }