title: How to auto scroll a ScrollPane so that a node will be aligned at the top of the pane
body: <p>In my program, I have a ScrollPane which its content is a VBox with a lot of child nodes. Some of the nodes are links which you can click and it should jump to the link's destination (imagine clicking the links in the Contents in a Wikipedia article, it will jump to the corresponding section). I know that in order to vertically scroll the ScrollPane by code, I would use <code>.setVvalue()</code>. </p>
  
  <p>My thinking is that I will get the y-coordinate of the link's destination node and divide it by the content's total height, and use that value as the <code>Vvalue</code>. The problem is that how would I accurately get the y-coordinate of a node if it's nested in multiple containers (e.g. in 2 VBoxes) using <code>.getBoundsInParent()</code>? Also, am I even approaching this the correct way?</p>
  
  <p>An example of what I mean:</p>
  
  <p><a href="https://i.imgur.com/6itBBLx.png" rel="nofollow noreferrer">Before clicking the link</a></p>
  
  <p><a href="https://i.imgur.com/CpElfZP.png" rel="nofollow noreferrer">After clicking the link</a></p>