Determine on which row the cell renderer to operate
I have a serious problem with the cell rederer. This to some extand is because I cannot understand it right.
I have a table with the following information. User name document and Status columns and is smth like an email. The user send an email and the status column serves to signalize whether somebody has answered(green-yes, red-refuse, yellow-promise)
I do the coloring with a cell renderer and the problems are the following.
1.I know how to color a cell but I don't know how to determine the row of this cell. The renderer colors all the ros in the column. The only condition that I can put is in accordance with the information from the other cell. For example to user A has been answered find user A, doc R and color the cell in the status bar with green. How can one determine the this row in the cell rednderer.
2. The secon problem is with the sorting. I have done the sorting like in the swing tutorial but when I put
fireTableDateChanged() in the cell renderer it stops working. Without it on the other hand the cell rendere does not change the colors dynamically.
3. And one more question. How can make the sorter works also for the status column. To order first the green then yellow and red color.
I would be very greatful if somebody can help me bacause I have the feeling that I am going in a circle.