private void scrollCharacterToVisible(int offset) {
TextPane textPane = (TextPane)getComponent();
Bounds characterBounds = getCharacterBounds(offset);
if (characterBounds != null) {
textPane.scrollAreaToVisible(characterBounds.x, characterBounds.y,
characterBounds.width, characterBounds.height);
}
}
/**