开发者

How can i use/insert HashTable Key and values into a JTable? [closed]

开发者 https://www.devze.com 2023-04-12 23:14 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_如何学Go Closed 11 years ago.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消