我目前正在使用 JTable rowFilter 来过滤我的行。过滤器隐藏不遵循配置模式的行。 我想知道是否可以使用 rowFilter 来更改结果的颜色或其他内容?例如,配置模式后的线为红色,其他为白色。
谢谢 西尔万
最佳答案
没什么复杂的。对于 String Instance
,我建议从 prepareRenderer 开始.在那里你可以设置很多参数,如RowFilter所示。示例 here基于 camickr 的 Table Row Rendering :-) 不要忘记设置 int modelRow = convertRowIndexToModel(row);
还有我关于 similair issue 的问题
关于java - 使用 JTable rowFilter 突出显示行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6663936/