// Get the XParagraphCursor interface of our text cursor
XParagraphCursor xParaCursor = (XParagraphCursor)
UnoRuntime.queryInterface( XParagraphCursor.class, mxDocCursor );
// Jump back before all the text we just inserted
xParaCursor.gotoPreviousParagraph ( false );
xParaCursor.gotoPreviousParagraph ( false );
// Insert a string at the beginning of the block of text
mxDocText.insertString ( mxDocCursor, "Fish section begins:", false );