@Override
	public void stateChanged(ChangeEvent e) {

		if (e.getSource() instanceof JViewport) {
			// note: this code is a workaround certain JVMs (VisualCafe,
			// jdk1.2.2) where the PageDown key is not handled correctly for
			// scrolling the JTree; the tree ends up a the bottom of the
			// viewport -- not desirable.
			JViewport viewport = (JViewport) e.getSource();
			Rectangle viewRect = viewport.getViewRect();

			Rectangle treeRect = tree.getBounds();
			if (viewRect.y < treeRect.y) {
				// force y position to be at the top of the viewport
				treeRect.y = 0;
				tree.setBounds(treeRect);
			}
			invalidate();
			validate();
		}
		else {
			tool.setConfigChanged(true);
		}
	}
Invoked when the target of the listener has changed its state.
@param e  a ChangeEvent object
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/programtree/ProgramTreePanel.java