title: How to get and set scrollbar position of Java table at run time?
body: <p>Currently with help of JAVA SWT (org.eclipse.swt.widgets.Table &amp; org.eclipse.jface.viewers.TableViewer library), I have a table which is getting populated from DB. Idea is to refresh the table data while user is scroll down to check the tables row using scroll-bar and let the scroll bar position restore to same point where it was before refresh event. So that user never feel that some refresh event is working in background while he scroll down the data.</p>
  
  <p>Is there any inbuilt method or library exist in jdk or in above eclipse package to get &amp; set the position of scroll-bar dynamically?</p>
  
  <p>I found a logic to get scroll bar position</p>
  
  <pre><code>ScrollBar vScroll = Table.getVerticalBar();
          int valuetemp = vScroll.getSelection();
  </code></pre>
  
  <p>But after refreshing the table content, when scroll-bar moved to very fist entry after that if I use below code to restore the scroll-bar. Ideally it should work as per API but it didn't move my scroll-bar position to the previous value.</p>
  
  <pre><code>vScroll.setSelection(valuetemp);
  </code></pre>