How can i use/insert HashTable Key and values into a JTable? [closed]
I want to use HashTable keys & value in a JTable. How can i do this ?
first: make yourself familiar with the use of tables
http://download.oracle.com/javase/tutorial/uiswing/components/table.html
and datamodels
http://download.oracle.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html
if you know, how to add data in a JTable, you can iterate over your HastTable by a foreach-loop
for(Map.Entry<K,V> entry : hashTable.entrySet()) {
for further information, see
http://download.oracle.com/javase/6/docs/api/java/util/Hashtable.html
and
http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html
精彩评论