public void paint(Graphics g, int offs0, int offs1, Shape bounds, JTextComponent c) {
			    
				    try {
						// --- determine locations ---
						TextUI mapper = c.getUI();
						Rectangle p0 = mapper.modelToView(c, offs0);
						Rectangle p1 = mapper.modelToView(c, offs1);
					
						// --- render ---
						g.setColor(color);
						if (p0.y == p1.y) {
						    // same line, render a rectangle
						    Rectangle r = p0.union(p1);
		//			    g.fillRect(r.x, r.y, r.width, r.height);
						    
						    drawErrLine(r, g);
						    
		//			    g.fillRect(r.x, r.y + r.height - 1, r.width, 1);
						} else {
							Rectangle alloc = bounds.getBounds();
						    // different lines
						    int p0ToMarginWidth = alloc.x + alloc.width - p0.x;
						    drawErrLine(new Rectangle(p0.x, p0.y, p0ToMarginWidth, p0.height), g);
						    if ((p0.y + p0.height) != p1.y) {
								drawErrLine(new Rectangle(alloc.x, p0.y + p0.height, alloc.width, 
										   p1.y - (p0.y + p0.height)), g);
						    }
							drawErrLine(new Rectangle(alloc.x, p1.y, (p1.x - alloc.x), p1.height), g);
						}
				    } catch (BadLocationException e) {
				    	// can't render
				    } catch (Exception e) {
				    	// can't render
				    }
				}