gpt4 book ai didi

java - 使用 JTable rowFilter 突出显示行

转载 作者:行者123 更新时间:2023-11-29 03:55:27 25 4
gpt4 key购买 nike

我目前正在使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com