I have two JTables which share the same column model. When the user resize the columns in the "main" table, the other table automatically follows. This didn't work due to a bug in Swing (
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4816146). I applied the suggested fix, and seemed to work ok. However, if the user drags the column margins to the extreme right (click on one of the column margins, drag right until the cursor is outside of the frame), it will now crash with a StackOverFlowError. I must admit I have no idea about how to fix that.
In the attached example, I've only included ONE table. It still crashes. I know that this example will work OK if I remove the columnMarginsChanges method, but then the bug described above will make it impossible to have two tables with the same ColumnModel.