I do not know how to answer the first part of your post.
It seems to me that in the second part, you are complaining about the color of the cell when it has the focus. Write a TableCellRenderer implementation that sets the the color of the cell when the argument
hasFocus to the method
TableCellrenderer.getTableCellRendererComponent(...) is true.
There are excellent examples of writing a TableCellRenderer around this forum at the moment. Or visit
How to use Tables in the
Java Tutorial.