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