How do you add a border to a row in a Jtable?

后端 未结 3 481
梦如初夏
梦如初夏 2021-01-03 13:16

I have a Jtable and I want to highlight a row by adding a border to the row. I have extended a DefaultTableCellRenderer and I figure the work needs to be done i

3条回答
  •  滥情空心
    2021-01-03 13:45

    You have the correct idea in mind, you will need to set the border on the label in the cellrenderer depending on where it is in the table(i.e. edge, center etc).

    Take a look at matteborder. You can specify which areas to draw a border along w/ width and color.

提交回复
热议问题