Does a swing filterable JList component exist?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 20:13:01

问题


For a specific screen, I'm looking for a JList that I could filter (the same way you can filter a JTable using a RowFilter)

Is there a good implementation of this kind of component anywhere here in the wild (and do you have an experience with it) or do I have to code it myself ?

(it is not that long to do, but if there is any valid implementation, I would be happy to use it)


回答1:


Yes, I'm sure that the SwingX components provide this. Check out JXList.

You can get SwingX from here.




回答2:


You could consider using a single column JTable instead of a JList. If you follow this approach you'll get filtering and sorting for free (providing you're using JDK 6).




回答3:


IMHO glazedlists should do filtering as well as sorting for JTable, JList and JComboBox.



来源:https://stackoverflow.com/questions/2362122/does-a-swing-filterable-jlist-component-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!