I have this dilemma about designing/programming border or gap widths in an application of mine. I’m using Swing but this is sort of implementation-agnostic. I have a splitter pane (JXMultiSplitPane) dividing two subpanes, shown below outlined in black; the black border will be gone in the real application and is just here for debugging.
You’ll note that there’s a gap between the two subpanes. That’s the splitter, and it needs to be wide enough to grap onto. You’ll also notice the gap between each table and the black border. That’s supposed to be there to add some reasonable space… except that if I remove the black borders, I now have a space between the two tables that looks 3x as wide as it should be.
My instinct is to get rid of the gap on the right side of the left-hand table, and the gap on the left side of the right hand table, so that the only gap is the splitter itself. Is this the right way to handle it? The only hesitation I have is that I may be giving the user the option to stack these vertically, so the actual border spacing of the left hand table needs to change (spacing adjacent to the splitter should be set to 0) and that seems weird….

Of course gap between those two panels needs to be only splitter and nothing else. There is no other way.
alt text http://img15.imageshack.us/img15/2250/myapp.png