Simultaneous scrolling in multiple frames

I have a JDesktopPane with a bunch of JInternalFrames. When the user scrolls any one of the frames, I want the other frames to all scroll in the same way at the same time. What's the best (or easiest) way to make this happen?
[233 byte] By [aadwighta] at [2007-11-27 10:06:55]
# 1
set the scrollpane's scrollbar models the same
Michael_Dunna at 2007-7-13 0:43:22 > top of Java-index,Desktop,Core GUI APIs...
# 2

Share the scrollbar model. Something like:

JScrollPane scrollPane = new JScrollPane(...);

BoundedRangeModel model = scrollPane.getVerticalScrollBar().getModel();

JScrollPane scrollPane2 = new JScrollPane(...);

scrollPane2.getVerticalScrollBar().setModel(model);

camickra at 2007-7-13 0:43:22 > top of Java-index,Desktop,Core GUI APIs...
# 3
That makes sense. Thanks.
aadwighta at 2007-7-13 0:43:22 > top of Java-index,Desktop,Core GUI APIs...