return null;
Rectangle bounds = null; if (index >= 0 && index < doc.getLength() - 1) { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readLock(); try { TextUI ui = getUI(); if (ui != null) {  Rectangle rect = new Rectangle(); Insets insets = getInsets(); rect.x = insets.left; rect.y = insets.top; rect.width = getWidth() - insets.left - insets.right; rect.height = getHeight() - insets.top - insets.bottom; View rootView = ui.getRootView(JTextComponent.this); if (rootView != null) { rootView.setSize(rect.width, rect.height); Shape s = rootView.modelToView(index, Position.Bias.Forward, index + 1, Position.Bias.Backward, rect); if (s != null) bounds = s.getBounds(); } } } catch (BadLocationException ex) {  } finally { if (doc instanceof AbstractDocument) ((AbstractDocument) doc).readUnlock(); } } return bounds;
    public Rectangle getCharacterBounds(int index)      throws NotImplementedException    {      return null; // TODO    }