【发布时间】:2023-04-09 04:26:01
【问题描述】:
我有一个行过滤器,但我需要加载除值之外的所有内容...
例子:
col1 | col2
-----------
1 | N
2 | Y
3 | O
我需要什么:
col1 | col2
-----------
1 | N
3 | O
我有什么:
RowFilter<TableModel, Object> firstFiler = null;
List<RowFilter<TableModel, Object>> filters = new
ArrayList<RowFilter<TableModel, Object>>();
RowFilter<TableModel, Object> compoundRowFilter = null;
try {
firstFiler = RowFilter.regexFilter("(?i)" + text, 1);
filters.add(firstFiler);
compoundRowFilter = RowFilter.andFilter(filters);
} catch (java.util.regex.PatternSyntaxException e) {
return;
}
sorter.setRowFilter(compoundRowFilter);
【问题讨论】: