private void syncScrollers(JScrollPane leftScrollPane, JScrollPane rightScrollPane) {
		final JViewport viewport1 = leftScrollPane.getViewport();
		final JViewport viewport2 = rightScrollPane.getViewport();
		viewport1.addChangeListener(e -> {
			int y = viewport1.getViewPosition().y;
			viewport2.setViewPosition(new Point(0, y));
		});
		viewport2.addChangeListener(e -> {
			int y = viewport2.getViewPosition().y;
			viewport1.setViewPosition(new Point(0, y));
		});
	}
Panel that displays two data types side by side.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/DataTypeComparePanel.java