void (JComponent c, int position) { final JScrollPane pane = findScrollPane(c); if (pane != null) { final JScrollBar bar = pane.getVerticalScrollBar(); if (bar != null) { bar.setValue(position); } } else { final JScrollBar scrollBar = findVerticalScrollBar(c); if (scrollBar != null) { scrollBar.setValue(position); } } }