0

I'm actually in a middle of a small problem. I have discovered that TableRowSorter and RowFilter are not included in Java 4. All of our clients are using Java 1.4.2_08 and it's not convenient for us to install java 6 on their machines. Is there by any chance, a way in which I can use the TableRowSorter, and the RowFilter classes, by using JDK 1.4.2_08? Please help.

4

2 回答 2

0

这个问题提供了一些用于排序表的替代库的答案。如果它们需要 Java 1.5,您应该能够使用Retroweaver使它们与 Java 1.4 兼容。不过,让它工作并支持它可能不是一件容易的事。即使不方便,我也会推动将客户端升级到 1.6。无论如何,升级还有很多其他好处,特别是对于安全修复。

于 2011-04-25T08:04:00.160 回答
0

我最终使用正则表达式来解析我的 JTables 中输入的搜索条件,并创建一个新的 ArrayList 来存储结果。之后,我使用新创建的 ArrayList 为我的 JTable 模型进行了数据绑定。

于 2012-07-13T13:21:20.303 回答