This is kind of an old thread but it is something that come up a lot. I have done just what you are saying in an app I wrote, I figured I would share it here in case anyone comes upon this thread (which they most certainly will). You can get the app, and more importantly the source code for it from here https://sites.google.com/site/hopsof/java-components-1/tools/uimanagerdefaultslookup that should show you how to do what you are asking, or if nothing else provide you with an easy way to retrieve the key-value pairs.
I have been working on getting cell merging to work with a JTable, and in order to do this I have had to rewrite all of BasicTableUI using its source code as a template. I have also needed to override the getCellRect method of JTable, and have created a custom CellRenderer. With that being said, the problem I have run into is that when I merge a group of cells together everything works until I go to highlight an area around that group of cells. When I do this the area that would have been highlighted had no cells been merged is cleared everywhere within that cell merger. That is probably confusing so I have included a few images:
This is an image of the table with a cell merger:
And these images are when I highlight some area around the cell merger that include part of the merger within the highlightings bounds (notice how some of the text is erased, this is the problem):
And it might be worth showing you that everything works fine when the entire cell merger is highlighted:
I should also mention that when cells are merged, the upper left hand cell take precedence, in other words, that cell is enlarged to the size of the cell merger and the other cells are simply never drawn (I took care of this in BasicTableUI).
I am presently unsure where to go from here to fix this issue. I was thinking it might have something to do with RepaintManager but I am unsure. If someone could point me in the right direction I would very much appreciate it. If you need any additional information please let me know.