public synchronized void paint (Graphics g)
		{	Dimension d=getSize();
			if (I==null || I.getWidth(this)!=d.width ||
					I.getHeight(this)!=d.height)
			{	I=createImage(W=d.width,H=d.height);
				if (I==null) return;
				IG=I.getGraphics();
				init();
			}
			dopaint(IG);
			g.drawImage(I,0,0,W,H,this);
			double vp,vs,hp,hs;
			if (V.size()>1) vp=(double)Top/V.size();
			else vp=0;
			if (V.size()>2*PageSize) vs=(double)PageSize/V.size();
			else vs=0.5;
			if (HOffset<10*W) hp=(double)HOffset/(10*W);
			else hp=0.9;
			hs=0.1;
			LD.setScrollbars(vp,vs,hp,hs);
		}