public void paint(Graphics g)
    {
	if(debug)
	    System.out.println("selected="+split.list.selected);
	g.setColor(Color.white);
	g.fillRect(0,0,getWidth(),getHeight());
	if(split.list==null)
	    return;
	g.setColor(Color.black);
	byte[] buf=split.list.getBuffer();
	for(int x=0;x<screenWidth;x++)
	    {
		if((x+1)*scale<split.nBytesRead)
		    {
			g.drawLine(x,
				   buf[(int)(x*scale)]+screenHeight/2,x+1,
				   buf[(int)((x+1)*scale)]+screenHeight/2);
		    }
	    }
	g.setColor(new Color(255,0,0,64));
	Segment s;
	int nSegments=split.list.size();
	if(debug)
	    System.out.println("total "+nSegments+" segments");
	for(int i=0;i<nSegments;i++)
	    {
		s=split.list.get(i);		
		g.fillRect((int)(s.start/scale),0,(int)((s.end-s.start)/scale),screenHeight);
		if(debug)
		    System.out.println("Segment "+i+" ("+s.start+", "+s.end+")");
	    }
	if(split.list.selected>=0 && split.list.selected<nSegments)
	    {
		s=split.list.get(split.list.selected);
		g.setColor(Color.red);
		g.drawRect((int)(s.start/scale),0,(int)((s.end-s.start)/scale),screenHeight);
	    }
    }