Java – how do I create a JList that contains hashtable entries for strings and objects?

I want to create a JList that contains entries for hashtable of string and object:

Hashtable<String,Object>

The JList element should contain a hash table entry and display the value of the entry key as a string

Is it possible? How?

Solution

Implement the listmodel interface by extending abstractlistmodel Create a JList using a derived model See also how to use lists

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>