I have a main split pane. In the left component of the split pane there is a scroll pane and a table inside the scroll pane. On the right component of the split pane there is a scroll pane and a tree inside the scroll pane. Now I have to change the selection background of the tree and table when one of them are selected. Say if I have selected a column in the left table and then when I select a node on the right tree, then the table selection background should turn gray in color. And vice versa should happen when I select a tree and then the table.
It just like showing the user the current selection in Blue colour and the previous selection in Gray color. I am using a TreeCellRenderer just to set the images for the icons in the tree.
I have managed to write this SSCCE... I believe the code should be written in TableListener... Correct me if I am wrong... Thanks!
I have managed to turn the color of table... but do not know how to change the color of selection in the tree...
Here's an SSCCE for the solution. Your SSCCE for the problem would possibly contain an empty actionPerformed(...) for the button.Remember, the shorter your code, the more members will read it; and more of those who do read it will understand where your problem lies.