Scroll two (or more ) tables with one scroolbar

I would add a ChangeListener to each table’s Viewport that would relay any desired operations to the other tables. And use mouseenter, mouseexit, and mousemove events to ensure only one table’s event are relayed at any given moment. The ChangeListener will get an event even if the scroll happens as a result of a non-mouse operation.

2 Likes