System.out.println("ContrastPlot.paint starting at "+System.currentTimeMillis());
	public void paint(Graphics g) {		System.out.println("ContrastPlot.paint starting at "+System.currentTimeMillis());		int x1, y1, x2, y2;		double scale = (double)WIDTH/(defaultMax-defaultMin);		double slope = 0.0;		if (max!=min)			slope = HEIGHT/(max-min);		if (min>=defaultMin) {			x1 = (int)(scale*(min-defaultMin));			y1 = HEIGHT;		} else {			x1 = 0;			if (max>min)				y1 = HEIGHT-(int)((defaultMin-min)*slope);			else				y1 = HEIGHT;		}		if (max<=defaultMax) {			x2 = (int)(scale*(max-defaultMin));			y2 = 0;		} else {			x2 = WIDTH;			if (max>min)				y2 = HEIGHT-(int)((defaultMax-min)*slope);			else				y2 = 0;		}		if (histogram!=null) {			if (os==null && hmax!=0) {				os = createImage(WIDTH,HEIGHT);				osg = os.getGraphics();				osg.setColor(Color.white);				osg.fillRect(0, 0, WIDTH, HEIGHT);				osg.setColor(Color.gray);				for (int i = 0; i < WIDTH; i++)					osg.drawLine(i, HEIGHT, i, HEIGHT - ((int)(HEIGHT * histogram[i])/hmax));				osg.dispose();			}			g.drawImage(os, 0, 0, this);		} else {			g.setColor(Color.white);			g.fillRect(0, 0, WIDTH, HEIGHT);		}		g.setColor(Color.black);		g.drawLine(x1, y1, x2, y2);		g.drawLine(x2, HEIGHT-5, x2, HEIGHT);		g.drawRect(0, 0, WIDTH, HEIGHT);		System.out.println("ContrastPlot.paint ending at "+System.currentTimeMillis());	 }