6
6e
I have created a custum prepareRenderer function for a JTable.
What it does is highlights the current row, plus the row underneath it.
However I find that if I click a row underneath the current 2
highlighted rows, it clears the highlight out, BUT if I click above the
2 highlighted rows, it does not clear the second rows highlighting.
After doing some research and testing and research and testing ... I
found that the row that isn't unhighlighting is not getting redrawn...
Which leads me to my question.
Is there a way to force the redrawing of a row in JTable?! I tried to
use repaint(), I also tried to select another row, both did not solve
the problem. It actually needs to go through the prepareRenderer
function to get the correct colored background...
Any ideas?
What it does is highlights the current row, plus the row underneath it.
However I find that if I click a row underneath the current 2
highlighted rows, it clears the highlight out, BUT if I click above the
2 highlighted rows, it does not clear the second rows highlighting.
After doing some research and testing and research and testing ... I
found that the row that isn't unhighlighting is not getting redrawn...
Which leads me to my question.
Is there a way to force the redrawing of a row in JTable?! I tried to
use repaint(), I also tried to select another row, both did not solve
the problem. It actually needs to go through the prepareRenderer
function to get the correct colored background...
Any ideas?