Does a swing filterable JList component exist?
Asked Answered
D

3

5

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)

Demagogy answered 2/3, 2010 at 9:37 Comment(0)
B
6

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

You can get SwingX from here.

Bookmark answered 2/3, 2010 at 9:45 Comment(2)
just updating the link: the home of SwingX is swingx.java.net (swinglabs.org is dysfunctional)Proportioned
SwingX is dead now, as are all those links including the java.net site. Using the JTable approach in Adamski's answer is the correct solution.Openmouthed
C
6

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).

Cougar answered 2/3, 2010 at 9:51 Comment(0)
S
0

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

Spann answered 2/3, 2010 at 9:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.