Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create a JList that contains entries of a Hashtable of String and Object?

I want to create a JList that contains entries of a Hashtable of String and object :

Hashtable<String,Object>

the JList element should contain the hashtable entry and display the value of the entry key that is a string ...

Is it possible ? How can it be done ?

like image 727
aleroot Avatar asked Jan 05 '12 18:01

aleroot


1 Answers

Implement the ListModel interface by extending AbstractListModel. Use the derived model to create your JList. See also How to Use Lists.

like image 103
trashgod Avatar answered Sep 21 '22 11:09

trashgod