title: Vertical scrollbar setValue always sets it to 90
body: <p>I'm saving the state of two scrollbars and loading it with these two methods:</p>
  
  <pre><code>private void saveScrollPosition() {
      scrollY = scrollPane.getVerticalScrollBar().getValue();
      scrollX = scrollPane.getHorizontalScrollBar().getValue();
      System.out.println("Saved: " + scrollX + "," + scrollY);
  }
  
  private void loadScrollPosition() {
      scrollPane.getVerticalScrollBar().setValue(scrollY);
      scrollPane.getHorizontalScrollBar().setValue(scrollX);
      System.out.println("Should load: " + scrollX + "," + scrollY);
      System.out.println("Loaded: " + scrollPane.getHorizontalScrollBar().getValue() + "," + scrollPane.getVerticalScrollBar().getValue());
  }
  </code></pre>
  
  <p>The horizontal scrollbar is doing what it is supposed to do but the vertical is always set to 90.</p>
  
  <blockquote>
    <p><strong>Console:</strong><br>
    Saved: 185,882<br>
    Should load: 185,882<br>
    Loaded: 185,90<br></p>
  </blockquote>
  
  <p>Found a tip in a forum to create a new Runnable method and start it with</p>
  
  <pre><code>SwingUtilities.invokeLater(doScroll);
  </code></pre>
  
  <p>but it didn't work out.</p>
  
  <p>I wonder what I'm doing wrong...</p>