是否存在 Swing 可过滤 JList 组件?

发布于 2024-08-23 02:22:51 字数 194 浏览 2 评论 0原文

对于特定屏幕,我正在寻找可以过滤的 JList (与使用 RowFilter 过滤 JTable 的方式相同)

在野外的任何地方是否有这种组件的良好实现(您有使用它的经验)还是我必须自己编写代码?

(这不是那么长的事情,但如果有任何有效的实现,我会很乐意使用它)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

心如荒岛 2024-08-30 02:22:51

是的,我确信 SwingX 组件提供了这一点。查看 JXList。

您可以从此处获取 SwingX。

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

You can get SwingX from here.

紧拥背影 2024-08-30 02:22:51

您可以考虑使用单列 JTable 而不是 JList。如果您遵循此方法,您将免费获得过滤和排序(前提是您使用的是 JDK 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).

演多会厌 2024-08-30 02:22:51

恕我直言,glazedlists 应该对 JTable、JList 和 JComboBox 进行过滤和排序。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文