how to blink table cell continuously after false if statement in swing

前端 未结 2 947
长情又很酷
长情又很酷 2021-01-27 15:30

In swing application, I am using DefaultTableCellRenderer to flash the table cell when the cell time is equal to system time. I wrote if statement to compare cell t

2条回答
  •  一个人的身影
    2021-01-27 16:14

    Create another column of data to store in the TableModel that contains a Boolean value. The data should only be in the model, but the column should NOT be displayed in the JTable.

    Then your logic can set the Boolean value to Boolean.TRUE whenever the times are the same. Once the value is true you never set it false. The renderer can now check the Boolean value to do the blinking for the cell and the blinking should continue fore ever.

提交回复
热议问题