开发者

Java Table: how to make it "selection impervious"

开发者 https://www.devze.com 2023-02-03 13:03 出处:网络
I have a table in a Java program which is read only:and I don\'t need any user-selection of cells.But, when I click on the table, an entire row will go blank, until I click on another row.Is that a开发

I have a table in a Java program which is read only: and I don't need any user-selection of cells. But, when I click on the table, an entire row will go blank, until I click on another row. Is that a开发者_JAVA百科 default table selection mode, and if so, how do I disable it?

Thanks in advance for any help.

John Doner


YOu might be overriding the cellrenderer of the table for it to exhibit this behaviour. Make sure you set foreground and background colors. Also try making the setcellselectionenabled as true.

0

精彩评论

暂无评论...
验证码 换一张
取 消