JTable with prepareRenderer()

I have a JTable that has overridden prepareRenderer();
When the table is displayed, prepareRenderer is called for each row/cell, twice:
prepareRenderer() (row, column): (0 ,0)
prepareRenderer() (row, column): (0 ,1)
prepareRenderer() (row, column): (0 ,2)
prepareRenderer() (row, column): (1 ,0)
prepareRenderer() (row, column): (1 ,1)
prepareRenderer() (row, column): (1 ,2)
prepareRenderer() (row, column): (2 ,0)
prepareRenderer() (row, column): (2 ,1)
prepareRenderer() (row, column): (2 ,2)
prepareRenderer() (row, column): (3 ,0)
prepareRenderer() (row, column): (3 ,1)
prepareRenderer() (row, column): (3 ,2)
prepareRenderer() (row, column): (0 ,0)
prepareRenderer() (row, column): (0 ,1)
prepareRenderer() (row, column): (0 ,2)
prepareRenderer() (row, column): (1 ,0)
prepareRenderer() (row, column): (1 ,1)
prepareRenderer() (row, column): (1 ,2)
prepareRenderer() (row, column): (2 ,0)
prepareRenderer() (row, column): (2 ,1)
prepareRenderer() (row, column): (2 ,2)
prepareRenderer() (row, column): (3 ,0)
prepareRenderer() (row, column): (3 ,1)
prepareRenderer() (row, column): (3 ,2)

Why twice?
LVL 1
allelopathAsked:
Who is Participating?
 
objectsCommented:
sounds like it goes to repaint the table again
try printing a stack trace in the call to see check nothing non standard is triggering it.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.