final int max = imageHeight - visibleHeight;
	private void handleResize() {		paintCanvas.update();		Rectangle visibleRect = paintCanvas.getClientArea();		visibleWidth = visibleRect.width;		visibleHeight = visibleRect.height;		ScrollBar horizontal = paintCanvas.getHorizontalBar();		if (horizontal != null) {			displayFDC.xOffset = Math.min(horizontal.getSelection(), imageWidth - visibleWidth);			if (imageWidth <= visibleWidth) {				horizontal.setEnabled(false);				horizontal.setSelection(0);			} else {				final int max = imageWidth - visibleWidth;				horizontal.setEnabled(true);				horizontal.setValues(displayFDC.xOffset, 0, imageWidth, visibleWidth,					8, visibleWidth);			}		}		ScrollBar vertical = paintCanvas.getVerticalBar();		if (vertical != null) {			displayFDC.yOffset = Math.min(vertical.getSelection(), imageHeight - visibleHeight);			if (imageHeight <= visibleHeight) {				vertical.setEnabled(false);				vertical.setSelection(0);			} else {				final int max = imageHeight - visibleHeight;				vertical.setEnabled(true);				vertical.setValues(displayFDC.yOffset, 0, imageHeight, visibleHeight,					8, visibleHeight);			}		}	}