Swing: the most efficient computational method for blinking specific cells in a table

I need a way to draw attention to specific cells in a large JTable (20x16!), And I want to know what it takes for the text to blink, for example. 900 ms and 100 ms.

(I'm familiar with the concept TableCellRenderer

)

Is there a way to do this only for the cells in question, without forcing all cells to redraw?

+3


source to share


1 answer


The required duty cycle (900ms on, 100ms off) and counter (20 x 16) are good for rendering JTable

that uses flies for efficiency. On rare occasions when issuing profile certificates, see the Christmas Trees article . See also comparison with approach prepareRenderer()

.



Addendum: Also consider GridLayout

of JLabel

, with each button having its own instance javax.swing.Timer

to avoid synchronous blinking. Timers share a common thread.

+3


source







All Articles