@Override
    public void mouseDragged(MouseEvent e) {
	float y = e.getY();
	if(scrolling) {
	    scrollPerc = (y - startScrolling)/this.height + startScrollingPerc;
	    scroll = (int) (scrollPerc * totalHeight);
	    if(scrollPerc < 0)
		scrollPerc = scroll = 0;
	    else 
		if(scroll > totalHeight - this.height) {
		    scroll = totalHeight - this.height;
		    scrollPerc = (float)scroll/(float)totalHeight;
		}
	}
    }