public boolean goTo(ProgramLocation loc, boolean centerWhenNotVisible) {
		Swing.assertSwingThread("goTo() must be called on the Swing thread");

		final FieldLocation floc = getFieldLocation(loc);
		if (floc == null) {
			return false;
		}

		if (centerWhenNotVisible) {
			fieldPanel.goTo(floc.getIndex(), floc.getFieldNum(), floc.getRow(), floc.getCol(),
				false);
		}
		else {
			fieldPanel.setCursorPosition(floc.getIndex(), floc.getFieldNum(), floc.getRow(),
				floc.getCol());
			fieldPanel.scrollToCursor();
		}
		return true;
	}
Moves the cursor to the given program location.
<p>
Also, repositions the scrollbar to show that location, if the location is not on the screen.

@param loc the location to move to.
@param centerWhenNotVisible this variable only has an effect if the given location is not on
           the screen. In that case, when this parameter is true, then the given location
           will be placed in the center of the screen; when the parameter is false, then the
           screen will be scrolled only enough to show the cursor.
@return true if successful
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingPanel.java