void updateScrollBar() {
		DNAScrollerModel dnamodel = getModel();
		if (dnamodel == null)
			return;
		if (dnamodel.getDNA() == null) {
			scrollBar.setValue(0);
			return;
		}
		if (!scrollBar.isVisible()) {
			scrollBar.setVisible(true);
		}
		int index = dnamodel.getCurrIndex();
		int startindex = dnamodel.getStartWindowIndex();
		int w = minWidth;
		int ncodonsinscroller = w / getCodonWidth();
		if (index < startindex) {
			int oldValue = scrollBar.getValue();
			if (index > 0) {
				dnamodel.setStartIndexToCurrent();
			}
			else {
				dnamodel.setStartWindowIndex(0);
				dnamodel.setCurrIndex(0);
			}
			setOpOffset();
			startindex = dnamodel.getStartWindowIndex();
			if (oldValue * 3 == startindex) {
				scroller.repaint();
				scrollBar.repaint();
			}
			else {
				scrollBar.setValue(startindex / 3);
			}
		}
		else if (index >= startindex + ncodonsinscroller * 3) {
			dnamodel.setStartWindowIndex(index - ncodonsinscroller * 3 + 3);
			setOpOffset();
			scrollBar.setValue(dnamodel.getStartWindowIndex() / 3);
		}
		else {
			setOpOffset();
			scroller.repaint();
			scrollBar.repaint();
		}
	}