force redraw of a row in jtable...

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(), but it did not solve the problem. It actually needs to
go through the prepareRenderer function to get the correct colored
background...

Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top